forked from atlassian-api/atlassian-python-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
90 lines (73 loc) · 3.06 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
88
89
import sys
import os
import io
from setuptools import find_packages
from setuptools import setup
HERE = os.path.dirname(__file__)
buildNumberFile = os.path.join(HERE, "BUILD_NUMBER")
versionFile = os.path.join(HERE, "VERSION")
buildNumber = "0"
_base_version = "0.15.{buildNumber}"
if os.path.exists(versionFile):
with io.open(versionFile, "r") as f:
_version = f.read().split("=")[1]
else:
_version = _base_version.format(buildNumber=buildNumber)
if __name__ == '__main__':
if "--buildNumber" in sys.argv:
i = sys.argv.index("--buildNumber") + 1
buildNumber = sys.argv[i]
print("Found build number '{0}'".format(buildNumber))
print("Try to create build number file: {0}".format(buildNumberFile))
with open(buildNumberFile, 'w') as f:
f.write(buildNumber)
_version = _base_version.format(buildNumber=buildNumber)
sys.argv.remove("--buildNumber")
sys.argv.remove(buildNumber)
with open(versionFile, 'w') as f:
print("Try to create version file: {0}".format(versionFile))
f.write("version={0}".format(_version))
setup(
name='atlassian-python-api',
description='Python Atlassian REST API Wrapper',
long_description='Python Atlassian REST API Wrapper',
license='Apache License 2.0',
version=_version,
download_url='https://github.com/MattAgile/atlassian-python-api',
author='Matt Harasymczuk',
author_email='[email protected]',
url='http://mattagile.com/',
packages=find_packages(),
package_data={'': ['LICENSE', 'README.rst'], 'atlassian': ['*.py']},
package_dir={'atlassian': 'atlassian'},
include_package_data=True,
zip_safe=False,
install_requires=['requests'],
extras_require={
'PEP8': ['pep8']
},
platforms='Platform Independent',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries :: Application Frameworks']
)