Skip to content

Commit cc30d71

Browse files
chore: create cleaner env (#608)
1 parent ec15da9 commit cc30d71

5 files changed

Lines changed: 110 additions & 179 deletions

File tree

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
shell: bash
6262
run: |
6363
python -m pip install --upgrade pip
64-
python -m pip install -e 'libs/pyTermTk[test]'
64+
python -m pip install -e '.[test]'
6565
6666
- name: Lint with flake8
6767
run: |

Makefile

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,26 @@
33
.venv:
44
python3 -m venv .venv
55
. .venv/bin/activate ; \
6-
pip install -r docs/requirements.txt
7-
# Add "Signal" option in the method domains
8-
# patch -p3 -d .venv/lib/python3*/ < docs/sphynx.001.signal.patch
9-
# Update/Regen
10-
# # Docs
11-
# pip install sphinx sphinx-epytext sphinx-autodocgen sphinx-rtd-theme
12-
# # Test
13-
# pip install flake8 pytest
14-
# # Build
15-
# pip install build twine
16-
# Regen requirements;
17-
# pip freeze > docs/requirements.txt
6+
pip install uv
187

198
.venv.ttkDesigner:
209
python3 -m venv .venv.ttkDesigner
2110
. .venv.ttkDesigner/bin/activate ; \
22-
pip install pyperclip Pillow
11+
pip install pyperclip Pillow
2312

2413
doc: .venv
2514
. .venv/bin/activate ; \
26-
make -C docs/source/ clean ; \
27-
make -C docs/source/ html ;
15+
uv pip install '.[docs]' ;
16+
. .venv/bin/activate ; \
17+
make -C docs/source/ clean ; \
18+
make -C docs/source/ html ;
2819

2920
testDoc:
3021
python3 -m http.server --directory docs/source/_build/html/
3122

32-
runTtkDesigner: .venv.ttkDesigner
33-
. .venv.ttkDesigner/bin/activate ; \
34-
python -m ttkDesigner
35-
36-
runGittk: .venv
37-
. .venv/bin/activate ; \
38-
demo/gittk.py -f
39-
40-
runDemo: .venv
41-
. .venv/bin/activate ; \
42-
demo/demo.py -f
43-
44-
runDumbImageTool: .venv
45-
. .venv/bin/activate ; \
46-
tools/dumb.image.tool.py
47-
48-
build: .venv
49-
. .venv/bin/activate ; \
50-
tools/prepareBuild.sh release ; \
51-
cd tmp ; \
52-
python3 -m build
53-
54-
deploy: .venv
55-
. .venv/bin/activate ; \
56-
python3 -m twine upload tmp/dist/*
57-
58-
buildTest: .venv
59-
. .venv/bin/activate ; \
60-
tools/prepareBuild.sh test ; \
61-
cd tmp ; \
62-
python3 -m build
63-
64-
buildTTkDesigner: .venv
65-
. .venv/bin/activate ; \
66-
tools/prepareBuild.sh ttkDesigner ; \
67-
cd tmp ; \
68-
python3 -m build
69-
70-
buildDumbPaintTool: .venv
71-
. .venv/bin/activate ; \
72-
tools/prepareBuild.sh dumbPaintTool ; \
73-
cd tmp ; \
74-
python3 -m build
75-
7623
deployTTkDesigner: .venv
7724
. .venv/bin/activate ; \
78-
python3 -m twine upload tmp/dist/*
25+
python3 -m twine upload tmp/dist/*
7926

8027
pyTermTk-Docs:
8128
git clone git@github.com:ceccopierangiolieugenio/pyTermTk-Docs.git
@@ -122,7 +69,7 @@ deploySandbox:
12269

12370
deployTest: .venv
12471
. .venv/bin/activate ; \
125-
python3 -m twine upload --repository testpypi tmp/dist/* --verbose
72+
python3 -m twine upload --repository testpypi tmp/dist/* --verbose
12673

12774
itchDumbPaintToolexporter:
12875
tools/webExporterInit.sh
@@ -134,6 +81,8 @@ test: .venv
13481
# Play the test stream
13582
# tests/pytest/test_001_demo.py -p test.input.bin
13683
tools/check.import.sh
84+
. .venv/bin/activate ; \
85+
uv pip install '.[test]' ; \
13786
. .venv/bin/activate ; \
13887
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .venv,build,tmp,experiments ;
13988
. .venv/bin/activate ; \

apps/ttkode/pyproject.toml

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,58 @@
11
[build-system]
2-
requires = ["setuptools>=45", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["setuptools>=45", "wheel"]
3+
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "ttkode"
7-
dynamic = ["version"]
8-
readme = {file = "README.md", content-type = "text/markdown"}
9-
authors = [
10-
{name = "Eugenio Parodi", email = "ceccopierangiolieugenio@googlemail.com"},
11-
]
12-
description = "Terminal ToolKit Studio Code editor"
13-
requires-python = ">=3.9"
14-
license = {text = "MIT"}
15-
classifiers = [
16-
"Programming Language :: Python :: 3",
17-
"License :: OSI Approved :: MIT License",
18-
"Operating System :: OS Independent",
19-
"Development Status :: 3 - Alpha",
20-
"Environment :: Console",
21-
"Intended Audience :: Developers",
22-
"Intended Audience :: Information Technology",
23-
"Topic :: Terminals",
24-
"Topic :: Software Development :: User Interfaces",
25-
]
26-
dependencies = [
27-
'pyTermTk>=0.48.1-a0',
28-
'pytest',
29-
'appdirs',
30-
'copykitten',
31-
'pygments'
32-
]
6+
name = "ttkode"
7+
dynamic = ["version"]
8+
readme = {file = "README.md", content-type = "text/markdown"}
9+
authors = [
10+
{name = "Eugenio Parodi", email = "ceccopierangiolieugenio@googlemail.com"},
11+
]
12+
description = "Terminal ToolKit Studio Code editor"
13+
requires-python = ">=3.9"
14+
license = {text = "MIT"}
15+
classifiers = [
16+
"Programming Language :: Python :: 3",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Development Status :: 3 - Alpha",
20+
"Environment :: Console",
21+
"Intended Audience :: Developers",
22+
"Intended Audience :: Information Technology",
23+
"Topic :: Terminals",
24+
"Topic :: Software Development :: User Interfaces",
25+
]
26+
dependencies = [
27+
'pyTermTk>=0.48.1-a0',
28+
'pytest',
29+
'appdirs',
30+
'copykitten',
31+
'pygments'
32+
]
33+
34+
[project.optional-dependencies]
35+
test = [
36+
"pytest>=8.3.4",
37+
"mypy>=1.15.0"
38+
]
3339

3440
[project.urls]
35-
Homepage = "https://github.com/ceccopierangiolieugenio/pyTermTk/tree/main/apps/ttkode"
36-
Repository = "https://github.com/ceccopierangiolieugenio/pyTermTk.git"
37-
Issues = "https://github.com/ceccopierangiolieugenio/pyTermTk/issues"
38-
Changelog = "https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/apps/ttkode/CHANGELOG.md"
41+
Homepage = "https://github.com/ceccopierangiolieugenio/pyTermTk/tree/main/apps/ttkode"
42+
Repository = "https://github.com/ceccopierangiolieugenio/pyTermTk.git"
43+
Issues = "https://github.com/ceccopierangiolieugenio/pyTermTk/issues"
44+
Changelog = "https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/apps/ttkode/CHANGELOG.md"
3945

4046
[project.scripts]
41-
ttkode = "ttkode.__main__:main"
47+
ttkode = "ttkode.__main__:main"
4248

4349
[tool.setuptools]
44-
packages = [
45-
"ttkode", "ttkode.app",
46-
"ttkode.plugins",
47-
"ttkode.plugins._010",
48-
]
50+
packages = [
51+
"ttkode", "ttkode.app",
52+
"ttkode.plugins",
53+
"ttkode.plugins._010",
54+
"ttkode.plugins._030",
55+
]
4956

5057
[tool.setuptools.dynamic]
51-
version = {attr = "ttkode.__version__"}
58+
version = {attr = "ttkode.__version__"}

docs/requirements.txt

Lines changed: 0 additions & 77 deletions
This file was deleted.

pyproject.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pyTermTk-Env-Setup"
7+
version = "0.0.0"
8+
readme = {file = "README.md", content-type = "text/markdown"}
9+
authors = [
10+
{name = "Eugenio Parodi", email = "ceccopierangiolieugenio@googlemail.com"},
11+
]
12+
description = "pyTermTk dev env"
13+
requires-python = ">=3.9"
14+
15+
dependencies = [
16+
'pyTermTk',
17+
'TTKode',
18+
'Tlogg',
19+
'TTkDesigner',
20+
'dumbPaintTool',
21+
]
22+
23+
[project.urls]
24+
Homepage = "https://github.com/ceccopierangiolieugenio/pyTermTk"
25+
Documentation = "https://ceccopierangiolieugenio.github.io/pyTermTk-Docs/"
26+
Repository = "https://github.com/ceccopierangiolieugenio/pyTermTk.git"
27+
Issues = "https://github.com/ceccopierangiolieugenio/pyTermTk/issues"
28+
Changelog = "https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/libs/pyTermTk/CHANGELOG.md"
29+
30+
[project.optional-dependencies]
31+
test = [
32+
"pyTermTk[test]",
33+
"ttkode[test]",
34+
"pytest>=8.3.4",
35+
"flake8>=7.2.0",
36+
"mypy>=1.15.0"
37+
]
38+
docs = [
39+
"Sphinx==8.2.3",
40+
"sphinx-book-theme==1.1.4"
41+
]
42+
43+
[tool.setuptools]
44+
packages = []
45+
46+
[tool.uv.sources]
47+
pyTermTk = { path = "libs/pyTermTk", editable = true }
48+
TTKode = { path = "apps/ttkode", editable = true }
49+
Tlogg = { path = "apps/tlogg", editable = true }
50+
TTkDesigner = { path = "apps/ttkDesigner", editable = true }
51+
dumbPaintTool = { path = "apps/dumbPaintTool", editable = true }
52+

0 commit comments

Comments
 (0)