From c0e80cf4b86415075c1540029b6699483cf5f387 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Mon, 3 Jun 2024 14:20:46 -0400 Subject: [PATCH] Use setuptools-scm to ensure all repo files are in sdist Listing `setuptools_scm` in `pyproject.toml` enables it to be used to determine which files are included in the sdist instead of the older `MANIFEST.in` procedure. `setuptools_scm` just includes every file tracked by `git` which seems fine for this small project. Additionally, delete `INSTALL.txt` which had outdated installation information. --- INSTALL.txt | 21 --------------------- MANIFEST.in | 13 ------------- pyproject.toml | 4 +++- 3 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 INSTALL.txt delete mode 100644 MANIFEST.in diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index 3408197f..00000000 --- a/INSTALL.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Some installation methods: - - python setup.py install - -or, for an installation in the user Python library (no additional access -rights needed): - - python setup.py install --user - -or, for an installation in a custom directory my_directory: - - python setup.py install --install-lib my_directory - -or, if additional access rights are needed (Unix): - - sudo python setup.py install - -* The tests programs (test_*.py) are meant to be run through pytest. This can be achieved for instance with a command -like - - pytest ./tests \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 12a16196..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,13 +0,0 @@ -include INSTALL.txt - -# Since 2019-02, for setuptools, the following can be replaced by the licence_file argument of setup(): -include LICENSE.txt - -# Docs: -recursive-include doc Makefile conf.py *.rst make.bat -graft doc/_templates -graft doc/_static -prune doc/_build - -# No backup files: -global-exclude *~ diff --git a/pyproject.toml b/pyproject.toml index 39636c6d..316ee765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools>=64", "setuptools-scm>=8"] build-backend = "setuptools.build_meta" [project] @@ -53,6 +53,8 @@ dependencies = [] include = ["uncertainties", "uncertainties.unumpy"] exclude = ["doc", "test"] +[tool.setuptools_scm] + [project.urls] Documentation = "http://uncertainties-python-package.readthedocs.io/" Repository = "https://github.com/lmfit/uncertainties"