-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
61 lines (52 loc) · 1.98 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
from setuptools import setup, find_packages
import ast
import sys
def readme():
with open('README.rst', 'r', encoding='utf-8') as f:
return f.read()
def get_version():
filename = 'iso20275/__init__.py'
with open(filename, 'r') as f:
tree = ast.parse(f.read(), filename)
for node in tree.body:
if (isinstance(node, ast.Assign) and
node.targets[0].id == '__version__'):
version = ast.literal_eval(node.value)
if isinstance(version, tuple):
version = '.'.join([str(x) for x in version])
return version
def get_install_requirements():
return ['setuptools']
setup(
name='iso-20275',
version=get_version(),
description='ISO 20275 Entity Legal Type package for Python',
long_description=readme(),
long_description_content_type='text/x-rst',
license='MIT',
author='Youri Hubaut',
packages=find_packages(),
package_data={'iso20275': [
'*.csv'
]},
url='https://github.com/Gawaboumga/iso-20275-python',
keywords='internationalization i18n elf iso20275 entity legal types',
install_requires=get_install_requirements(),
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: Stackless',
'Topic :: Software Development :: Internationalization',
]
)