Mercurial > hgrepos > Python > apps > py-cutils
annotate setup.py @ 127:6a50d02fe0ca
Change the filename output: make it more consistent
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 02 Jan 2025 17:46:50 +0100 |
| parents | 3bd3f32b5e60 |
| children | 73e8116484f2 |
| 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 | |
|
72
ae2df602beb4
Make shasum.py and dos2unix sub-modules to the new "cutils" package
Franz Glasner <fzglas.hg@dom66.de>
parents:
46
diff
changeset
|
22 with open(os.path.join(pkg_root, "cutils", "__init__.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: |
| 46 | 26 long_description = rf.read() |
| 29 | 27 |
| 28 setup( | |
| 29 name="py-cutils", | |
| 30 version=version, | |
| 31 author="Franz Glasner", | |
|
73
c3268f4e752f
Adjust all license notes to (a) more literally comply with the BSD3 templates and to the style guide
Franz Glasner <fzglas.hg@dom66.de>
parents:
72
diff
changeset
|
32 license="""BSD 3-Clause "New" or "Revised" License""", |
| 29 | 33 url="https://pypi.dom66.de/simple/py-cutils/", |
|
115
e15b3d1ff0d9
New subpackage with a "contextlib.nullcontext" for older Python versions
Franz Glasner <fzglas.hg@dom66.de>
parents:
112
diff
changeset
|
34 description="Pure Python implementation of some coreutils with some extensions", |
| 31 | 35 long_description=long_description, |
|
115
e15b3d1ff0d9
New subpackage with a "contextlib.nullcontext" for older Python versions
Franz Glasner <fzglas.hg@dom66.de>
parents:
112
diff
changeset
|
36 packages=["cutils", "cutils.util"], |
| 29 | 37 include_package_data=False, |
| 38 zip_safe=True, | |
| 39 platforms="any", | |
| 40 classifiers=[ | |
| 41 "Development Status :: 5 - Production/Stable", | |
| 42 "Environment :: Console", | |
| 43 "Intended Audience :: Developers", | |
|
111
0c778a183e38
Add "End Users/Desktop" to the intended audience
Franz Glasner <fzglas.hg@dom66.de>
parents:
73
diff
changeset
|
44 "Intended Audience :: End Users/Desktop", |
| 29 | 45 "Intended Audience :: System Administrators", |
| 46 "License :: OSI Approved :: BSD License", | |
| 47 "Operating System :: OS Independent", | |
| 48 "Programming Language :: Python :: 2.7", | |
| 49 "Programming Language :: Python :: 3", | |
| 50 "Topic :: System", | |
| 51 "Topic :: Utilities", | |
| 52 ], | |
| 53 python_requires=">=2.7", | |
| 46 | 54 entry_points={ |
| 29 | 55 "console_scripts": [ |
|
72
ae2df602beb4
Make shasum.py and dos2unix sub-modules to the new "cutils" package
Franz Glasner <fzglas.hg@dom66.de>
parents:
46
diff
changeset
|
56 "py-dos2unix=cutils.dos2unix:main", |
|
ae2df602beb4
Make shasum.py and dos2unix sub-modules to the new "cutils" package
Franz Glasner <fzglas.hg@dom66.de>
parents:
46
diff
changeset
|
57 "py-shasum=cutils.shasum:main", |
|
124
3bd3f32b5e60
A first version of "treesum" is working
Franz Glasner <fzglas.hg@dom66.de>
parents:
115
diff
changeset
|
58 "py-treesum=cutils.treesum:main", |
| 29 | 59 ] |
| 60 } | |
| 61 ) |
