|
1 | 1 | from setuptools import setup
|
| 2 | +import io |
| 3 | +import os |
| 4 | + |
| 5 | +from re import search |
| 6 | + |
| 7 | + |
| 8 | +def get_version(): |
| 9 | + with open('telium/version.py') as version_file: |
| 10 | + return search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""", |
| 11 | + version_file.read()).group('version') |
| 12 | + |
| 13 | + |
| 14 | +here = os.path.abspath(os.path.dirname(__file__)) |
| 15 | + |
| 16 | +DESCRIPTION = ('A cross-platform point of sales payment manager tool with Telium Manager ' |
| 17 | + 'Support every device with Telium Manager like Ingenico terminals.') |
| 18 | + |
| 19 | +try: |
| 20 | + with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
| 21 | + long_description = '\n' + f.read() |
| 22 | +except FileNotFoundError: |
| 23 | + long_description = DESCRIPTION |
2 | 24 |
|
3 | 25 | setup(
|
4 | 26 | name='pyTeliumManager',
|
5 |
| - version='2.4.0', |
| 27 | + version=get_version(), |
6 | 28 | author='Ahmed TAHRI, @Ousret',
|
7 | 29 | author_email='ahmed.tahri@cloudnursery.dev',
|
8 |
| - description=('A cross-platform point of sales payment manager tool with Telium Manager ' |
9 |
| - 'Support every device with Telium Manager like Ingenico terminals.'), |
| 30 | + description=DESCRIPTION, |
| 31 | + long_description=long_description, |
| 32 | + long_description_content_type='text/markdown', |
10 | 33 | license='MIT',
|
11 | 34 | packages=['telium'],
|
12 | 35 | test_suite='test',
|
13 | 36 | url='https://github.com/Ousret/pyTeliumManager',
|
14 |
| - download_url='https://github.com/Ousret/pyTeliumManager/archive/2.4.0.tar.gz', |
| 37 | + download_url='https://github.com/Ousret/pyTeliumManager/archive/2.4.1.tar.gz', |
15 | 38 | install_requires=['pyserial>=3.3', 'pycountry>=17.0', 'payment_card_identifier>=0.1.2', 'six'],
|
16 | 39 | tests_require=['Faker'],
|
17 | 40 | keywords=['ingenico', 'telium manager', 'telium', 'payment', 'credit card', 'debit card', 'visa', 'mastercard',
|
|
22 | 45 | 'Environment :: X11 Applications',
|
23 | 46 | 'Environment :: MacOS X',
|
24 | 47 | 'Intended Audience :: Developers',
|
25 |
| - 'License :: OSI Approved :: BSD License', |
| 48 | + 'License :: OSI Approved :: MIT License', |
26 | 49 | 'Operating System :: OS Independent',
|
27 | 50 | 'Programming Language :: Python',
|
28 | 51 | 'Programming Language :: Python :: 2.7',
|
|
33 | 56 | 'Programming Language :: Python :: 3.4',
|
34 | 57 | 'Programming Language :: Python :: 3.5',
|
35 | 58 | 'Programming Language :: Python :: 3.6',
|
| 59 | + 'Programming Language :: Python :: 3.7', |
| 60 | + 'Programming Language :: Python :: 3.8' |
36 | 61 | ]
|
37 | 62 | )
|
0 commit comments