-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
87 lines (78 loc) · 2.85 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
84
85
86
87
"""
My Tool does one thing, and one thing well.
"""
import sys
from setuptools import find_packages, setup
def install_deps():
"""Reads requirements.txt and preprocess it
to be feed into setuptools.
This is the only possible way (we found)
how requirements.txt can be reused in setup.py
using dependencies from private github repositories.
Links must be appendend by `-{StringWithAtLeastOneNumber}`
or something like that, so e.g. `-9231` works as well as
`1.1.0`. This is ignored by the setuptools, but has to be there.
Returns:
list of packages and dependency links.
"""
default = open('requirements.txt', 'r').readlines()
new_pkgs = []
links = []
for resource in default:
"""
Do not install multiprocessing for Python 2.6+ or 3+:
"""
py3_26_or_higher = sys.version_info[0]==3 or \
(sys.version_info[0]==2 and sys.version_info[1]>5)
if py3_26_or_higher and 'multiprocessing' in resource:
pass
elif 'git+https' in resource:
pkg = resource.split('#')[-1]
links.append(resource.strip() + '-9876543210')
new_pkgs.append(pkg.replace('egg=', '').rstrip())
else:
new_pkgs.append(resource.strip())
return new_pkgs, links
dependencies, dependency_links = install_deps()
setup(
name='atf2conllconvertor',
version='0.2.10',
url='https://github.com/jayanthjaiswal/atf2conll-convertor',
license='BSD',
author='Jayanth',
author_email='[email protected]',
description='My Tool does one work, and one work well.',
long_description=__doc__,
packages=find_packages(exclude=['tests']),
include_package_data=True,
zip_safe=False,
platforms='any',
install_requires=dependencies,
dependency_links=dependency_links,
entry_points={
'console_scripts': [
'atf2conll = atf2conll_convertor.cli:main',
],
},
classifiers=[
# As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
# 'Development Status :: 1 - Planning',
# 'Development Status :: 2 - Pre-Alpha',
# 'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
# 'Development Status :: 5 - Production/Stable',
# 'Development Status :: 6 - Mature',
# 'Development Status :: 7 - Inactive',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Operating System :: Unix',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)