Skip to content

Commit f74438c

Browse files
CopilotNewFuture
andauthored
fix: add missing packages to pip distribution (config and scheduler) (#572)
* Initial plan * chore: initial investigation - reproduce pip install issue Co-authored-by: NewFuture <[email protected]> * fix(pyproject): add missing packages config and scheduler to pip distribution Co-authored-by: NewFuture <[email protected]> * test(ci): add pip install verification tests to GitHub Actions Co-authored-by: NewFuture <[email protected]> * refactor(ci): improve pip install test commands for better error handling Co-authored-by: NewFuture <[email protected]> * refactor(ci): use find command for more robust file selection in pip tests Co-authored-by: NewFuture <[email protected]> * revert(init): restore placeholder values for BUILD_VERSION and BUILD_DATE Co-authored-by: NewFuture <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: NewFuture <[email protected]> Co-authored-by: New Future <[email protected]>
1 parent aba52bc commit f74438c

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,27 @@ jobs:
108108
run: sed -i'' -E 's#([("'\''`])(/doc/[^)"'\''`]+)\.md([)"'\''`])#\1https://ddns.newfuture.cc\2.html\3#g; s#([("'\''`])/doc/#\1https://ddns.newfuture.cc/doc/#g' README.md
109109
- name: Build package
110110
run: python -m build --sdist --wheel --outdir dist/
111+
112+
- name: Test pip install from wheel
113+
run: |
114+
wheel_file=$(find dist -name "*.whl" -type f)
115+
test -n "$wheel_file" || { echo "No wheel file found"; exit 1; }
116+
python3 -m pip install --force-reinstall "$wheel_file"
117+
ddns --version
118+
ddns --help
119+
ddns --new-config /tmp/test-pip-config.json
120+
test -f /tmp/test-pip-config.json
121+
python3 -m ddns --version
122+
123+
- name: Test pip install from source distribution
124+
run: |
125+
python3 -m pip uninstall -y ddns
126+
tarball_file=$(find dist -name "*.tar.gz" -type f)
127+
test -n "$tarball_file" || { echo "No tarball file found"; exit 1; }
128+
python3 -m pip install --force-reinstall "$tarball_file"
129+
ddns --version
130+
python3 -m ddns --help
131+
111132
- name: run unit tests
112133
run: python3 -m unittest -v
113134

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ pytest = [
6262
# Setuptools configuration
6363
[tool.setuptools]
6464
platforms = ["any"]
65-
packages = ["ddns", "ddns.provider", "ddns.util"]
65+
packages = ["ddns", "ddns.config", "ddns.provider", "ddns.scheduler", "ddns.util"]
6666
package-dir= {"ddns" = "ddns"}
67-
py-modules = ["ddns","ddns.provider", "ddns.util"]
6867

6968
#[tool.setuptools.packages.find]
7069
#where = ["."]

0 commit comments

Comments
 (0)