From c0888a7a5853a8c03787bbca182d7e3cdd4898c4 Mon Sep 17 00:00:00 2001 From: Charley Saint Date: Wed, 8 Jul 2026 10:51:59 -0700 Subject: [PATCH] Fix sdist to include the C submodule and build files `python setup.py sdist` (and thus the published PyPI sdist) is unbuildable: it ships only setup.py + metadata, with none of the nlopt C sources, extensions.py, or the top-level CMakeLists.txt. `pip install ` then fails at: CMake Error: The source directory "..." does not appear to contain CMakeLists.txt Root cause is MANIFEST.in: - `recursive-include extern/nlopt` has no file pattern, so setuptools silently includes none of the extern/nlopt submodule. - extensions.py (imported by setup.py) and the root CMakeLists.txt (passed to CMake by extensions.py) are not listed, so they are excluded as well. Add the missing `*` pattern and explicitly include extensions.py, CMakeLists.txt, and setup.cfg. The resulting sdist (~2 MB) builds from source with SWIG + NumPy. --- MANIFEST.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index ec92a80..312233a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,4 +2,7 @@ include LICENSE include MANIFEST.in include README.md include setup.py -recursive-include extern/nlopt +include setup.cfg +include extensions.py +include CMakeLists.txt +recursive-include extern/nlopt *