From b7719c988dd1417416734521caab5e91ac9eb625 Mon Sep 17 00:00:00 2001 From: Arthit Suriyawongkul Date: Fri, 13 Mar 2026 22:38:38 +0700 Subject: [PATCH 1/3] Remove MANIFEST.in; Migrate to pyproject.toml With the use of setuptools_scm, all files that are tracked with the version control system will be included in the distribution anyway -- so there's no need to declared "graft/include" in the MANIFEST.in. The side effect of completely remove MANIFEST.in is the egg-info will be included. As setuptools can't be configured to prune src/spdx_tools.egg-info via pyproject.toml config. But the inclusion of egg-info is actually a standard practice (setuptools itself also include this information). The additional size of sdist when include the egg-info is 5.6 kbytes (704,357 vs 698,744 bytes). If needed, we can also include a minimal MANIFEST.in with one line: prune src/spdx_tools.egg-info to exclude the egg-info from sdist Signed-off-by: Arthit Suriyawongkul --- .gitignore | 43 ++++++++++++++++++++++--------------------- .python-version | 1 + MANIFEST.in | 15 --------------- 3 files changed, 23 insertions(+), 36 deletions(-) create mode 100644 .python-version diff --git a/.gitignore b/.gitignore index d82f5bc0d..cc9d48dba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,43 +1,44 @@ -__pycache__/ -*.py[cod] -*.out +# Build outputs /build/ /dist*/ -/tmp/ +*.egg-info/ +/.eggs/ src/spdx_tools/spdx/parser/tagvalue/parsetab.py -/.cache/ +# Python cache +__pycache__/ +*.py[cod] +*.out + +# Virtual environments .tox venv* - -# virtualenv /bin +/include +/Include /lib /Lib /local /local/ -/.eggs/ -*.egg-info/ -/Include -/include -/pip-selfcheck.json -.Python /share/ # IDEs +.idea .project .pydevproject -.idea -org.eclipse.core.resources.prefs .vscode -.pytest_cache - -# Installer logs -pip-log.txt +org.eclipse.core.resources.prefs -# Unit test / coverage reports +# Testing and type checking .cache .coverage .coverage.* -nosetests.xml +.mypy_cache +.pytest_cache htmlcov + +# OS temporary files +*.*~ +._* +.DS_Store +/tmp/ diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..8ce85f2bb --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +tools-python diff --git a/MANIFEST.in b/MANIFEST.in index bd749b0cf..4b17602d6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,16 +1 @@ -graft examples -graft src -graft tests - prune src/spdx_tools.egg-info - -include .gitignore -include README.md -include CHANGELOG.md -include CONTRIBUTING.md -include DOCUMENTATION.md -include LICENSE -include setup.py -include pyproject.toml - -global-exclude *.py[co] __pycache__ *.*~ .DS_Store .pytest_cache .mypy_cache From 222310adbf632f8d3ab4612e98c111af9e561a41 Mon Sep 17 00:00:00 2001 From: Arthit Suriyawongkul Date: Fri, 13 Mar 2026 22:45:56 +0700 Subject: [PATCH 2/3] Delete .python-version Signed-off-by: Arthit Suriyawongkul --- .python-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .python-version diff --git a/.python-version b/.python-version deleted file mode 100644 index 8ce85f2bb..000000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -tools-python From 34ca7888399ffef052d5ab511bf15c113cc3ed46 Mon Sep 17 00:00:00 2001 From: Arthit Suriyawongkul Date: Fri, 13 Mar 2026 22:47:50 +0700 Subject: [PATCH 3/3] Add pyenv .python-version to .gitignore Signed-off-by: Arthit Suriyawongkul --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cc9d48dba..2bfb74acd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/ *.out # Virtual environments +.python-version .tox venv* /bin