commit | e3f1373a29fb02391efb9be06561f3e81c13d313 | [log] [tgz] |
---|---|---|
author | Peter Pentchev <pp@storpool.com> | Thu Jan 18 13:45:34 2024 +0200 |
committer | Peter Pentchev <pp@storpool.com> | Thu Jan 18 13:45:34 2024 +0200 |
tree | 788f647a524a44bf24d9b5b081520e599f0e1896 | |
parent | fd046a0df0bd6b6d891876979d432bd229f89cbb [diff] |
gifn-apply: push the Python source down into subdirectories Push the source of the gifn_apply module from python/ down into python/src/ Push the unit tests from python/unit_tests/ to python/tests/unit/ This is done mainly to make sure that there are no implicit import paths involved either in the packaging of the Python sdist/wheel, or in the pytest run. Change-Id: Ie5f85bc080836cfa84ab267b869f8bc009e3e197
diff --git a/tools/git-if-needed/pyproject.toml b/tools/git-if-needed/pyproject.toml index a259e91..a0d040d 100644 --- a/tools/git-if-needed/pyproject.toml +++ b/tools/git-if-needed/pyproject.toml
@@ -21,7 +21,7 @@ [tool.setuptools] zip-safe = true -package-dir = {"" = "python"} +package-dir = {"" = "python/src"} packages = ["gifn_apply"] [tool.mypy]
diff --git a/tools/git-if-needed/python/config/ruff-base/pyproject.toml b/tools/git-if-needed/python/config/ruff-base/pyproject.toml index b9e1932..d067c07 100644 --- a/tools/git-if-needed/python/config/ruff-base/pyproject.toml +++ b/tools/git-if-needed/python/config/ruff-base/pyproject.toml
@@ -32,4 +32,4 @@ [tool.ruff.per-file-ignores] # This is a test suite -"*/unit_tests/*" = ["S101"] +"python/tests/unit/*" = ["S101"]
diff --git a/tools/git-if-needed/python/gifn_apply/__init__.py b/tools/git-if-needed/python/src/gifn_apply/__init__.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/__init__.py rename to tools/git-if-needed/python/src/gifn_apply/__init__.py
diff --git a/tools/git-if-needed/python/gifn_apply/__main__.py b/tools/git-if-needed/python/src/gifn_apply/__main__.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/__main__.py rename to tools/git-if-needed/python/src/gifn_apply/__main__.py
diff --git a/tools/git-if-needed/python/gifn_apply/defs.py b/tools/git-if-needed/python/src/gifn_apply/defs.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/defs.py rename to tools/git-if-needed/python/src/gifn_apply/defs.py
diff --git a/tools/git-if-needed/python/gifn_apply/gifn.py b/tools/git-if-needed/python/src/gifn_apply/gifn.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/gifn.py rename to tools/git-if-needed/python/src/gifn_apply/gifn.py
diff --git a/tools/git-if-needed/python/gifn_apply/git.py b/tools/git-if-needed/python/src/gifn_apply/git.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/git.py rename to tools/git-if-needed/python/src/gifn_apply/git.py
diff --git a/tools/git-if-needed/python/gifn_apply/quilt.py b/tools/git-if-needed/python/src/gifn_apply/quilt.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/quilt.py rename to tools/git-if-needed/python/src/gifn_apply/quilt.py
diff --git a/tools/git-if-needed/python/gifn_apply/repo_url.py b/tools/git-if-needed/python/src/gifn_apply/repo_url.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/repo_url.py rename to tools/git-if-needed/python/src/gifn_apply/repo_url.py
diff --git a/tools/git-if-needed/python/gifn_apply/util.py b/tools/git-if-needed/python/src/gifn_apply/util.py similarity index 100% rename from tools/git-if-needed/python/gifn_apply/util.py rename to tools/git-if-needed/python/src/gifn_apply/util.py
diff --git a/tools/git-if-needed/python/unit_tests/__init__.py b/tools/git-if-needed/python/tests/unit/__init__.py similarity index 100% rename from tools/git-if-needed/python/unit_tests/__init__.py rename to tools/git-if-needed/python/tests/unit/__init__.py
diff --git a/tools/git-if-needed/python/unit_tests/test_repo_urls.py b/tools/git-if-needed/python/tests/unit/test_repo_urls.py similarity index 100% rename from tools/git-if-needed/python/unit_tests/test_repo_urls.py rename to tools/git-if-needed/python/tests/unit/test_repo_urls.py
diff --git a/tools/git-if-needed/python/unit_tests/test_util.py b/tools/git-if-needed/python/tests/unit/test_util.py similarity index 100% rename from tools/git-if-needed/python/unit_tests/test_util.py rename to tools/git-if-needed/python/tests/unit/test_util.py
diff --git a/tools/git-if-needed/tox.ini b/tools/git-if-needed/tox.ini index df7df5e..a93e828 100644 --- a/tools/git-if-needed/tox.ini +++ b/tools/git-if-needed/tox.ini
@@ -14,8 +14,8 @@ [defs] pyfiles = - python/gifn_apply \ - python/unit_tests + python/src/gifn_apply \ + python/tests/unit [testenv:format] skip_install = True @@ -64,7 +64,7 @@ deps = -r python/requirements/test.txt commands = - pytest {posargs} python/unit_tests + pytest {posargs} python/tests/unit [testenv:reuse] skip_install = True