From da8d49c30d6836d0abb8d2f60a651fbc1479f54a Mon Sep 17 00:00:00 2001 From: shimwell Date: Wed, 19 Aug 2026 14:39:00 +0200 Subject: [PATCH] Exclude depletion chain xml files from the wheel and sdist The chain xml files under src/openmc_data/depletion are tracked in git so that download_chain can fetch them from the github raw urls listed in urls_xml.py. They were also being picked up as package data, which took the 2.5.0 wheel to 210 MB and caused PyPI to reject the upload with a 400, the per file limit being 100 MB. Turn off include-package-data and list the json data files explicitly, which are the only data files read from the installed package (add_branching_ratios reads branching_ratios_*.json). Add a MANIFEST.in to keep the xml files out of the sdist as well. The wheel goes from 210 MB to 95 KB. --- MANIFEST.in | 3 +++ pyproject.toml | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..093956f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +# Keep the depletion chain xml files out of the sdist, they are downloaded +# from github on demand by download_chain rather than shipped in the package +exclude src/openmc_data/depletion/*.xml diff --git a/pyproject.toml b/pyproject.toml index 84bf8d0..10569a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,14 @@ tests = [ [tool.setuptools] package-dir = {"" = "src"} +# The chain xml files in src/openmc_data/depletion are tracked in git so that +# they can be fetched with download_chain (see urls_xml.py), but they are far +# too big to ship in the distributions, so only the json data files are +# included as package data. +include-package-data = false + +[tool.setuptools.package-data] +"openmc_data.depletion" = ["*.json"] [project.scripts] convert_fendl = "openmc_data.convert.convert_fendl:main"