From 77aa559dd5d62b9b78d3d76c7f904195fb3e1038 Mon Sep 17 00:00:00 2001 From: Geoff McDonald Date: Wed, 19 Jul 2023 20:20:41 -0700 Subject: [PATCH 1/2] Revert removal of headers glob in setup.py for Linux --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a1101b3..c0e0187 100644 --- a/setup.py +++ b/setup.py @@ -8,11 +8,12 @@ from pybind11.setup_helpers import Pybind11Extension, build_ext from setuptools import setup, Extension, find_packages -__version__ = "0.1.11" +__version__ = "0.1.12" ext_modules = [ Pybind11Extension("binary2strings", sorted(glob("src/*.cpp")), # Sort source files for reproducibility + headers = sorted(glob("src/*.hpp")), # Critical for Linux package building define_macros = [('VERSION_INFO', __version__)], include_dirs = ["src"], ), From 34c9d6222240f72a2e0ed32cd52d7c0c05cdc38e Mon Sep 17 00:00:00 2001 From: Geoff McDonald Date: Wed, 19 Jul 2023 20:36:40 -0700 Subject: [PATCH 2/2] Add MANIFEST.in to include the missing headers in the source distribution. --- MANIFEST.in | 1 + setup.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c77b0aa --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include src/*.hpp \ No newline at end of file diff --git a/setup.py b/setup.py index c0e0187..6747ab6 100644 --- a/setup.py +++ b/setup.py @@ -8,20 +8,24 @@ from pybind11.setup_helpers import Pybind11Extension, build_ext from setuptools import setup, Extension, find_packages -__version__ = "0.1.12" +__version__ = "0.1.13" ext_modules = [ Pybind11Extension("binary2strings", sorted(glob("src/*.cpp")), # Sort source files for reproducibility - headers = sorted(glob("src/*.hpp")), # Critical for Linux package building define_macros = [('VERSION_INFO', __version__)], include_dirs = ["src"], ), ] # Note to self to build and upload skip existing: +# Delete dist/ and build/ # python setup.py sdist bdist_wheel # twine upload dist/* --skip-existing +# Get token from https://pypi.org/manage/account/token/ +# Use username __token__ +# Use password from token +# Delete token after use with open("README.md", "r") as fh: long_description = fh.read() setup(