Skip to content

Commit ab11ddd

Browse files
committed
Issues #286: deps in toml come from requirements.txt
1 parent 31942d3 commit ab11ddd

File tree

10 files changed

+33
-22
lines changed

10 files changed

+33
-22
lines changed

Fit

Makefile

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ update_venv:
7272
$(VENV)/bin/python -m pip install --upgrade pip
7373

7474
$(VENV):
75-
$(PYTHON) -m venv --upgrade-deps $(VENV)
75+
$(SYS_PYTHON_PATH) -m venv --upgrade-deps $(VENV)
7676

7777
clean_venv:
78+
echo "Cleaning venv"
7879
rm -rf $(VENV)
7980

8081
version_check:
@@ -94,9 +95,21 @@ publish_check: build
9495
publish: clean publish_check
9596
$(PYTHON_PATH) -m twine upload dist/* --verbose
9697

97-
build: devdeps
98+
builddeps: $(VENV) devdeps
99+
100+
build: builddeps
101+
cp pyproject.toml.in pyproject.toml
102+
uv add -r requirements.txt
98103
$(PYTHON_PATH) -m build
99104

105+
build_clean:
106+
echo "Cleaning build"
107+
rm -rf pyproject.toml
108+
rm -rf *.egg-info
109+
rm -rf build
110+
rm -rf dist
111+
rm -rf uv.lock
112+
100113
$(PROJECT_BASE)/dist/$(MODULE)-*.whl: build
101114

102115
install: $(PROJECT_BASE)/dist/$(MODULE)-*.whl
@@ -118,7 +131,7 @@ install_pip_all: $(SUBMODULES:%=%-install_pip) install_pip
118131
reinstall: clean $(PROJECT_BASE)/dist/$(MODULE)-*.whl
119132
$(PIP_PATH) install --upgrade --force-reinstall --no-deps $(PROJECT_BASE)/dist/$(MODULE)-*.whl
120133

121-
reinstall_all: clean uninstall_all install_all
134+
reinstall_all: clean builddeps uninstall_all install_all
122135

123136
$(SUBMODULES:%=%-uninstall):
124137
$(MAKE) -C $(subst -uninstall,,$@) uninstall
@@ -184,7 +197,8 @@ $(SUBDIRS:%=%-clean):
184197
rm -f garmindb/$(subst -clean,,$@)/*.pyc
185198
rm -rf garmindb/$(subst -clean,,$@)/__pycache__
186199

187-
clean: $(SUBMODULES:%=%-clean) $(SUBDIRS:%=%-clean) test_clean
200+
clean: $(SUBMODULES:%=%-clean) $(SUBDIRS:%=%-clean) test_clean build_clean
201+
echo "Cleaning project"
188202
rm -f *.pyc
189203
rm -f *.log
190204
rm -f scripts/*.log
@@ -196,11 +210,9 @@ clean: $(SUBMODULES:%=%-clean) $(SUBDIRS:%=%-clean) test_clean
196210
rm -f scripts/*stats.txt
197211
rm -f Jupyter/*stats.txt
198212
rm -rf __pycache__
199-
rm -rf *.egg-info
200-
rm -rf build
201-
rm -rf dist
202213

203214
realclean: clean clean_venv
215+
echo "Done realclean"
204216

205217
checkup: update_garmin
206218
garmindb_checkup.py --battery

Tcx

defines.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ PYTHON3=python3
3131
PIP3=pip3
3232

3333
PYTHON ?= $(PYTHON3)
34+
# what python should the venv be based on?
35+
SYS_PYTHON_PATH ?= PYTHON3=$(shell which $(PYTHON3))
3436
PIP ?= $(PIP3)
3537

3638

dev-requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flake8==7.2.0
2-
build==1.2.1
3-
wheel==0.44.0
4-
twine==6.1.0
1+
flake8==7.3.0
2+
build==1.3.0
3+
wheel==0.45.1
4+
twine==6.2.0

garmindb/version_info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77

88
python_required = (3, 10, 0)
9-
dev_python_required = (3, 13, 5)
10-
python_tested = (3, 13, 5)
11-
version_info = (3, 6, 6)
9+
dev_python_required = (3, 13, 9)
10+
python_tested = (3, 13, 9)
11+
version_info = (3, 6, 7)
1212
prerelease = True
1313

1414

pyproject.toml renamed to pyproject.toml.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ description = "Garmin Connect download and analysis"
55
authors = [
66
{name = "Tom Goetz"},
77
]
8-
dependencies = [
9-
"SQLAlchemy==2.0.41",
10-
"garth>=0.5.17"
11-
]
128
requires-python = ">=3.10"
139
readme = "README.md"
1410
license = {text = "GPL"}

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sqlalchemy~=2.0.41
1+
sqlalchemy~=2.0.44
22
python-dateutil
33
cached-property
44
tqdm

test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ db_objects: $(DB_OBJECTS_TEST_GROUPS)
3232
verify_commit: module_versions db_objects
3333

3434
clean:
35+
echo "Cleaning test"
3536
rm -f *.pyc
3637
rm -f *.log
3738
rm -f *.txt

utilities

0 commit comments

Comments
 (0)