This repository has been archived by the owner on Jul 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 480
/
setup.py
83 lines (67 loc) · 2.22 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
from __future__ import print_function
import distutils.spawn
import shlex
import subprocess
import sys
from setuptools import find_packages
from setuptools import setup
version = '1.9.7'
if sys.argv[1] == 'release':
if not distutils.spawn.find_executable('twine'):
print(
'Please install twine:\n\n\tpip install twine\n',
file=sys.stderr,
)
sys.exit(1)
commands = [
'git pull origin main',
'git tag v{:s}'.format(version),
'git push origin main --tags',
'python setup.py sdist',
'twine upload dist/torchfcn-{:s}.tar.gz'.format(version),
]
for cmd in commands:
print('+ {}'.format(cmd))
subprocess.check_call(shlex.split(cmd))
sys.exit(0)
def get_long_description():
with open('README.md') as f:
long_description = f.read()
try:
import github2pypi
return github2pypi.replace_url(
slug='wkentaro/pytorch-fcn', content=long_description
)
except Exception:
return long_description
def get_install_requires():
with open('requirements.txt') as f:
return [req.strip() for req in f]
setup(
name='torchfcn',
version=version,
packages=find_packages(exclude=['github2pypi']),
install_requires=get_install_requires(),
description='PyTorch Implementation of Fully Convolutional Networks.',
long_description=get_long_description(),
long_description_content_type='text/markdown',
package_data={'torchfcn': ['ext/*']},
include_package_data=True,
author='Kentaro Wada',
author_email='www.kentaro.wada@gmail.com',
license='MIT',
url='https://github.com/wkentaro/pytorch-fcn',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
],
)