Mercurial > hgrepos > Python > apps > py-cutils
annotate setup.py @ 43:d856432a1cbb
Extend copyright year to 2022
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 19 Jan 2022 00:16:43 +0100 |
| parents | 1de48e84a5fb |
| children | dc198b661149 |
| rev | line source |
|---|---|
| 29 | 1 #!/usr/bin/env python |
| 2 # -*- coding: utf-8 -*- | |
| 3 | |
| 4 import re | |
| 5 import os | |
| 6 import sys | |
| 7 try: | |
| 8 from setuptools import setup | |
| 9 except ImportError: | |
| 10 from distutils.core import setup | |
| 11 | |
| 12 | |
| 13 if (sys.version_info[0] < 2) or \ | |
| 14 ((sys.version_info[0] == 2) and (sys.version_info[1] < 7)): | |
| 15 raise ValueError("Need at least Python 2.7") | |
| 16 | |
| 17 pkg_root = os.path.dirname(__file__) | |
| 18 | |
| 19 _version_re = re.compile(br"^\s*__version__\s*=\s*(\"|')(.*)\1\s*(#.*)?$", | |
| 20 re.MULTILINE) | |
| 21 | |
|
30
ffcce6062bee
Put the version number info the optinal common module _cutils.py
Franz Glasner <fzglas.hg@dom66.de>
parents:
29
diff
changeset
|
22 with open(os.path.join(pkg_root, "_cutils.py"), "rb") as vf: |
| 29 | 23 version = _version_re.search(vf.read()).group(2).decode("utf-8") |
| 24 | |
| 31 | 25 with open(os.path.join(pkg_root, "README.txt"), "rt") as rf: |
| 26 long_description = rf.read() | |
| 29 | 27 |
| 28 setup( | |
| 29 name="py-cutils", | |
| 30 version=version, | |
| 31 author="Franz Glasner", | |
| 32 license="BSD 3-Clause License", | |
| 33 url="https://pypi.dom66.de/simple/py-cutils/", | |
| 34 description="Pure Python implementation of some coreutils", | |
| 31 | 35 long_description=long_description, |
|
30
ffcce6062bee
Put the version number info the optinal common module _cutils.py
Franz Glasner <fzglas.hg@dom66.de>
parents:
29
diff
changeset
|
36 py_modules=["_cutils", |
|
36
1de48e84a5fb
Implemented a dos2unix command.
Franz Glasner <fzglas.hg@dom66.de>
parents:
31
diff
changeset
|
37 "dos2unix", |
|
30
ffcce6062bee
Put the version number info the optinal common module _cutils.py
Franz Glasner <fzglas.hg@dom66.de>
parents:
29
diff
changeset
|
38 "shasum",], |
| 29 | 39 include_package_data=False, |
| 40 zip_safe=True, | |
| 41 platforms="any", | |
| 42 classifiers=[ | |
| 43 "Development Status :: 5 - Production/Stable", | |
| 44 "Environment :: Console", | |
| 45 "Intended Audience :: Developers", | |
| 46 "Intended Audience :: System Administrators", | |
| 47 "License :: OSI Approved :: BSD License", | |
| 48 "Operating System :: OS Independent", | |
| 49 "Programming Language :: Python", | |
| 50 "Programming Language :: Python :: 2.7", | |
| 51 "Programming Language :: Python :: 3", | |
| 52 "Topic :: System", | |
| 53 "Topic :: Utilities", | |
| 54 ], | |
| 55 python_requires=">=2.7", | |
| 56 entry_points = { | |
| 57 "console_scripts": [ | |
|
36
1de48e84a5fb
Implemented a dos2unix command.
Franz Glasner <fzglas.hg@dom66.de>
parents:
31
diff
changeset
|
58 "py-dos2unix=dos2unix:main", |
| 29 | 59 "py-shasum=shasum:main", |
| 60 ] | |
| 61 } | |
| 62 ) |
