|
1 | 1 | # ============================================================================= |
2 | | -# _____ _ _ _ _ ___ |
3 | | -# _ __ _ |_ _|__ _ __ _ __ ___ (_)_ __ __ _| | | | |_ _| |
4 | | -# | '_ \| | | || |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | || | |
5 | | -# | |_) | |_| || | __/ | | | | | | | | | | | (_| | | |_| || | |
6 | | -# | .__/ \__, ||_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|\___/|___| |
7 | | -# |_| |___/ |
| 2 | +# _____ _ _ _____ _ _ _ _ ___ |
| 3 | +# _ __ _ |_ _|__ ___ | (_)_ __ __ _|_ _|__ _ __ _ __ ___ (_)_ __ __ _| | | | |_ _| |
| 4 | +# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | || | |
| 5 | +# | |_) | |_| || | (_) | (_) | | | | | | (_| |_| | __/ | | | | | | | | | | | (_| | | |_| || | |
| 6 | +# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|\___/|___| |
| 7 | +# |_| |___/ |___/ |
8 | 8 | # ============================================================================= |
9 | 9 | # Authors: Patrick Lehmann |
10 | 10 | # |
11 | 11 | # Package installer: A set of helpers to implement a text user interface (TUI) in a terminal. |
12 | 12 | # |
13 | | -# |
14 | 13 | # License: |
15 | 14 | # ============================================================================ |
16 | 15 | # Copyright 2017-2021 Patrick Lehmann - Bötzingen, Germany |
|
30 | 29 | # SPDX-License-Identifier: Apache-2.0 |
31 | 30 | # ============================================================================ |
32 | 31 | # |
33 | | -import setuptools |
| 32 | +from pathlib import Path |
| 33 | +from setuptools import ( |
| 34 | + setup as setuptools_setup, |
| 35 | + find_namespace_packages as setuptools_find_namespace_packages |
| 36 | +) |
34 | 37 |
|
35 | | -with open("README.md", "r") as file: |
36 | | - long_description = file.read() |
| 38 | +gitHubNamespace = "pyTooling" |
| 39 | +projectName = "TerminalUI" |
| 40 | +projectNameWithPrefix = "pyTooling." + projectName |
| 41 | +version = "1.4.2" |
37 | 42 |
|
38 | | -requirements = [] |
39 | | -with open("requirements.txt") as file: |
40 | | - for line in file.readlines(): |
41 | | - requirements.append(line) |
| 43 | +# Read README for upload to PyPI |
| 44 | +readmeFile = Path("README.md") |
| 45 | +with readmeFile.open("r") as file: |
| 46 | + long_description = file.read() |
42 | 47 |
|
43 | | -projectName = "pyTerminalUI" |
| 48 | +# Read requirements file and add them to package dependency list |
| 49 | +requirementsFile = Path("requirements.txt") |
| 50 | +with requirementsFile.open("r") as file: |
| 51 | + requirements = [line for line in file.readlines()] |
44 | 52 |
|
45 | | -github_url = "https://github.com/Paebbels/" + projectName |
46 | | -rtd_url = "https://" + projectName + ".readthedocs.io/en/latest/" |
| 53 | +# Derive URLs |
| 54 | +sourceCodeURL = f"https://github.com/{gitHubNamespace}/{projectName}" |
| 55 | +#documentationURL = f"https://{gitHubNamespace}.github.io/{projectName}" |
| 56 | +documentationURL = f"https://{projectName}.readthedocs.io/en/latest/" |
47 | 57 |
|
48 | | -setuptools.setup( |
49 | | - name=projectName, |
50 | | - version="1.4.2", |
| 58 | +# Assemble all package information |
| 59 | +setuptools_setup( |
| 60 | + name=projectNameWithPrefix, |
| 61 | + version=version, |
51 | 62 |
|
52 | 63 | author="Patrick Lehmann", |
53 | 64 | author_email="Paebbels@gmail.com", |
54 | 65 | # maintainer="Patrick Lehmann", |
55 | 66 | # maintainer_email="Paebbels@gmail.com", |
| 67 | + license='Apache 2.0', |
56 | 68 |
|
57 | 69 | description="A set of helpers to implement a text user interface (TUI) in a terminal.", |
58 | 70 | long_description=long_description, |
59 | 71 | long_description_content_type="text/markdown", |
60 | 72 |
|
61 | | - url=github_url, |
| 73 | + url=sourceCodeURL, |
62 | 74 | project_urls={ |
63 | | - 'Documentation': rtd_url, |
64 | | - 'Source Code': github_url, |
65 | | - 'Issue Tracker': github_url + "/issues" |
| 75 | + 'Documentation': f"{documentationURL}", |
| 76 | + 'Source Code': f"{sourceCodeURL}", |
| 77 | + 'Issue Tracker': f"{sourceCodeURL}/issues" |
66 | 78 | }, |
67 | | - # download_url="", |
68 | 79 |
|
69 | | - packages=setuptools.find_packages(exclude=["tests", "tests.*"]), |
| 80 | + packages=setuptools_find_namespace_packages(exclude=["doc", "doc.*", "tests", "tests.*",]), |
70 | 81 | classifiers=[ |
71 | 82 | "License :: OSI Approved :: Apache Software License", |
72 | 83 | "Operating System :: OS Independent", |
|
75 | 86 | "Programming Language :: Python :: 3.7", |
76 | 87 | "Programming Language :: Python :: 3.8", |
77 | 88 | "Programming Language :: Python :: 3.9", |
| 89 | + "Programming Language :: Python :: 3.10", |
78 | 90 | "Development Status :: 5 - Production/Stable", |
79 | 91 | "Intended Audience :: Developers", |
80 | 92 | "Topic :: Utilities" |
|
83 | 95 |
|
84 | 96 | python_requires='>=3.6', |
85 | 97 | install_requires=requirements, |
86 | | - # provides= |
87 | | - # obsoletes= |
88 | 98 | ) |
0 commit comments