Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 9801e33

Browse files
committed
Changed dependency to pyTooling and renamed to pyTooling.TerminalUI.
(cherry picked from commit 9e551c2) # Conflicts: # pyTooling/TerminalUI/__init__.py
1 parent 87866dc commit 9801e33

7 files changed

Lines changed: 62 additions & 60 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A set of helpers to implement a text user interface (TUI) in a terminal.
3333
This is a minimal terminal application example which inherits from `LineTerminal`.
3434

3535
```python
36-
from pyTerminalUI import LineTerminal
36+
from pyTooling.TerminalUI import LineTerminal
3737

3838
class Application(LineTerminal):
3939
def __init__(self):
@@ -46,7 +46,7 @@ class Application(LineTerminal):
4646

4747
# entry point
4848
if __name__ == "__main__":
49-
Application.versionCheck((3,6,0))
49+
Application.versionCheck((3, 6, 0))
5050
app = Application()
5151
app.run()
5252
app.exit()
@@ -58,8 +58,8 @@ This example hands over the terminal instance to a submodule, which implements
5858
`ILineTerminal`, so the submodule can also use the terminal's writing methods.
5959

6060
```python
61-
from pathlib import Path
62-
from pyTerminalUI import LineTerminal, ILineTerminal
61+
from pathlib import Path
62+
from pyTooling.TerminalUI import LineTerminal, ILineTerminal
6363

6464
class SubModule(ILineTerminal):
6565
def __init__(self, configFile, terminal):

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Contributors
139139
************
140140

141141
* `Patrick Lehmann <https://github.com/Paebbels>`_ (Maintainer)
142-
* `and more... <https://github.com/paebbels/pyCallBy/graphs/contributors>`__
142+
* `and more... <https://github.com/pyTooling/pyTooling.TerminalUI/graphs/contributors>`__
143143

144144

145145

pyTooling/TerminalUI/__init__.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
# =============================================================================
2-
# _____ _ _ _ _ ___
3-
# _ __ _ |_ _|__ _ __ _ __ ___ (_)_ __ __ _| | | | |_ _|
4-
# | '_ \| | | || |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | || |
5-
# | |_) | |_| || | __/ | | | | | | | | | | | (_| | | |_| || |
6-
# | .__/ \__, ||_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|\___/|___|
7-
# |_| |___/
2+
# _____ _ _ _____ _ _ _ _ ___
3+
# _ __ _ |_ _|__ ___ | (_)_ __ __ _|_ _|__ _ __ _ __ ___ (_)_ __ __ _| | | | |_ _|
4+
# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | || |
5+
# | |_) | |_| || | (_) | (_) | | | | | | (_| |_| | __/ | | | | | | | | | | | (_| | | |_| || |
6+
# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|\___/|___|
7+
# |_| |___/ |___/
88
# =============================================================================
99
# Authors: Patrick Lehmann
1010
#
1111
# Python package: A set of helpers to implement a text user interface (TUI) in a terminal.
1212
#
13-
# Description:
14-
# ------------------------------------
15-
# TODO
16-
#
1713
# License:
1814
# ============================================================================
1915
# Copyright 2017-2021 Patrick Lehmann - Bötzingen, Germany
@@ -38,6 +34,13 @@
3834
import sys
3935
from platform import system as platform_system
4036

37+
from pyTooling.Decorators import export
38+
from pyTooling.MetaClasses import Singleton
39+
40+
41+
__version__ = "1.4.2"
42+
43+
4144
from pydecor import export
4245
from pyMetaClasses import Singleton
4346

requirements.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
colorama>=0.4.4
2-
pydecor>=2.0.1
3-
4-
pyExceptions>=1.1.1
5-
pyMetaClasses>=1.3.1
2+
pyTooling>=1.4.1

setup.py

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# =============================================================================
2-
# _____ _ _ _ _ ___
3-
# _ __ _ |_ _|__ _ __ _ __ ___ (_)_ __ __ _| | | | |_ _|
4-
# | '_ \| | | || |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | || |
5-
# | |_) | |_| || | __/ | | | | | | | | | | | (_| | | |_| || |
6-
# | .__/ \__, ||_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|\___/|___|
7-
# |_| |___/
2+
# _____ _ _ _____ _ _ _ _ ___
3+
# _ __ _ |_ _|__ ___ | (_)_ __ __ _|_ _|__ _ __ _ __ ___ (_)_ __ __ _| | | | |_ _|
4+
# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | || |
5+
# | |_) | |_| || | (_) | (_) | | | | | | (_| |_| | __/ | | | | | | | | | | | (_| | | |_| || |
6+
# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|\___/|___|
7+
# |_| |___/ |___/
88
# =============================================================================
99
# Authors: Patrick Lehmann
1010
#
1111
# Package installer: A set of helpers to implement a text user interface (TUI) in a terminal.
1212
#
13-
#
1413
# License:
1514
# ============================================================================
1615
# Copyright 2017-2021 Patrick Lehmann - Bötzingen, Germany
@@ -30,43 +29,55 @@
3029
# SPDX-License-Identifier: Apache-2.0
3130
# ============================================================================
3231
#
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+
)
3437

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"
3742

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()
4247

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()]
4452

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/"
4757

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,
5162

5263
author="Patrick Lehmann",
5364
author_email="Paebbels@gmail.com",
5465
# maintainer="Patrick Lehmann",
5566
# maintainer_email="Paebbels@gmail.com",
67+
license='Apache 2.0',
5668

5769
description="A set of helpers to implement a text user interface (TUI) in a terminal.",
5870
long_description=long_description,
5971
long_description_content_type="text/markdown",
6072

61-
url=github_url,
73+
url=sourceCodeURL,
6274
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"
6678
},
67-
# download_url="",
6879

69-
packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
80+
packages=setuptools_find_namespace_packages(exclude=["doc", "doc.*", "tests", "tests.*",]),
7081
classifiers=[
7182
"License :: OSI Approved :: Apache Software License",
7283
"Operating System :: OS Independent",
@@ -75,6 +86,7 @@
7586
"Programming Language :: Python :: 3.7",
7687
"Programming Language :: Python :: 3.8",
7788
"Programming Language :: Python :: 3.9",
89+
"Programming Language :: Python :: 3.10",
7890
"Development Status :: 5 - Production/Stable",
7991
"Intended Audience :: Developers",
8092
"Topic :: Utilities"
@@ -83,6 +95,4 @@
8395

8496
python_requires='>=3.6',
8597
install_requires=requirements,
86-
# provides=
87-
# obsoletes=
8898
)

tests/unit/TerminalUI.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#
1111
# Python unittest: Testing the pyTerminalUI module
1212
#
13-
# Description:
14-
# ------------------------------------
15-
# TODO
16-
#
1713
# License:
1814
# ============================================================================
1915
# Copyright 2017-2021 Patrick Lehmann - Bötzingen, Germany
@@ -35,15 +31,15 @@
3531
# ============================================================================
3632
#
3733
"""
38-
pyTerminalUI
39-
############
34+
pyTooling.TerminalUI
35+
####################
4036
4137
:copyright: Copyright 2007-2021 Patrick Lehmann - Bötzingen, Germany
4238
:license: Apache License, Version 2.0
4339
"""
4440
from unittest import TestCase
4541

46-
from pyTerminalUI import LineTerminal
42+
from pyTooling.TerminalUI import LineTerminal
4743

4844

4945
if __name__ == "__main__":

tests/unit/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#
1111
# Python unittest: Helper functions for unittests
1212
#
13-
# Description:
14-
# ------------------------------------
15-
# TODO
16-
#
1713
# License:
1814
# ============================================================================
1915
# Copyright 2017-2021 Patrick Lehmann - Bötzingen, Germany
@@ -35,8 +31,8 @@
3531
# ============================================================================
3632
#
3733
"""
38-
pyTerminalUI
39-
############
34+
pyTooling.TerminalUI
35+
####################
4036
4137
:copyright: Copyright 2007-2021 Patrick Lehmann - Bötzingen, Germany
4238
:license: Apache License, Version 2.0

0 commit comments

Comments
 (0)