forked from zanata/zanata-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·71 lines (61 loc) · 1.95 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
#!/usr/bin/env python
"""
Build script for zanata-python-client
"""
from setuptools import setup, find_packages
import os
import subprocess
def read(fname):
return (open(os.path.join(os.path.dirname(__file__), fname), 'rb')
.read().decode('utf-8'))
def get_client_version():
version_number = ""
# Use the version in VERSION-FILE
path = os.path.dirname(os.path.realpath(__file__))
version_file = os.path.join(path, 'zanataclient', 'VERSION-FILE')
try:
version = open(version_file, 'rb')
client_version = version.read()
version.close()
version_number = client_version.rstrip().strip('version: ')
except IOError:
print("Please run VERSION-GEN or 'make install' to generate VERSION-FILE")
version_number = "UNKNOWN"
return version_number
requirements = read('requirements.txt').splitlines() + [
'setuptools',
]
setup(
name="zanata-python-client",
version=get_client_version(),
packages=find_packages(),
include_package_data=True,
install_requires=requirements,
description="Zanata Python Client.",
author='Jian Ni, Ding-Yi Chen, Anish Patil, Sundeep Anand',
author_email='dchen@redhat.com, apatil@redhat.com, suanand@redhat.com',
license='LGPLv2+',
platforms=["Linux"],
scripts=["zanata", "flies"],
url='https://github.com/zanata/zanata-python-client',
# entry_points = {
# 'console_scripts': [
# 'zanata = zanataclient.zanata:main',
# ]
# },
package_data={
'': ['VERSION-FILE']
},
data_files=[
('share/doc/zanata-python-client',
['CHANGELOG', 'COPYING', 'COPYING.LESSER', 'zanata.ini']
)
],
classifiers=[
'License :: OSI Approved :: GNU Lesser General Public License (LGPL)',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)