|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 |
|
3 | | -import sys |
4 | | -from os.path import join, dirname |
5 | | - |
6 | | -import barcode as pkg |
7 | | - |
8 | | -from setuptools import setup, find_packages |
9 | | - |
10 | | - |
11 | | -# Avoid name clashes if the user has Python 2 and 3 installed |
12 | | -console_script = 'pybarcode{0}'.format(sys.version_info[0]) |
13 | | -try: |
14 | | - import argparse # lint:ok |
15 | | - required = [] |
16 | | -except ImportError: |
17 | | - required = ['argparse'] |
18 | | - |
19 | | -with open(join(dirname(__file__), 'README.rst')) as fp: |
20 | | - long_desc = fp.read() |
| 3 | +from pathlib import Path |
| 4 | +from setuptools import find_packages, setup |
21 | 5 |
|
22 | 6 |
|
23 | 7 | setup( |
24 | | - name=pkg.__project__, |
25 | | - version=pkg.__release__, |
| 8 | + name='python-barcode', |
26 | 9 | packages=find_packages(), |
27 | | - url=pkg.__url__, |
28 | | - license=pkg.__license__, |
29 | | - author=pkg.__author__, |
30 | | - author_email=pkg.__author_email__, |
31 | | - description=pkg.__description__, |
32 | | - long_description=long_desc, |
33 | | - classifiers=pkg.__classifiers__, |
| 10 | + url="https://github.com/WhyNotHugo/python-barcode", |
| 11 | + license='MIT', |
| 12 | + author='Thorsten Weimann et al', |
| 13 | + author_email='weimann.th@yahoo.com', |
| 14 | + description=( |
| 15 | + 'Create standard barcodes with Python. No external modules needed ' |
| 16 | + '(optional PIL support included).' |
| 17 | + ), |
| 18 | + long_description=Path('README.rst').read_text(), |
| 19 | + classifiers=[ |
| 20 | + 'Development Status :: 5 - Production/Stable', |
| 21 | + 'Environment :: Console', |
| 22 | + 'Intended Audience :: Developers', |
| 23 | + 'License :: OSI Approved :: MIT License', |
| 24 | + 'Operating System :: OS Independent', |
| 25 | + 'Programming Language :: Python', |
| 26 | + 'Programming Language :: Python :: 3', |
| 27 | + 'Programming Language :: Python :: 3.5', |
| 28 | + 'Programming Language :: Python :: 3.6', |
| 29 | + 'Topic :: Multimedia :: Graphics', |
| 30 | + 'Topic :: Software Development :: Libraries :: Python Modules', |
| 31 | + ], |
34 | 32 | entry_points={ |
35 | | - 'console_scripts': |
36 | | - ['{0} = barcode.pybarcode:main'.format(console_script)], |
37 | | - }, |
38 | | - install_requires=required, |
| 33 | + 'console_scripts': [ |
| 34 | + 'python-barcode = barcode.pybarcode:main', |
| 35 | + ], |
| 36 | + }, |
| 37 | + use_scm_version={ |
| 38 | + 'version_scheme': 'post-release', |
| 39 | + 'write_to': 'barcode/version.py', |
| 40 | + }, |
| 41 | + setup_requires=['setuptools_scm'], |
39 | 42 | include_package_data=True, |
40 | 43 | ) |
0 commit comments