pybind / cmake_example

Example pybind11 module built with a CMake-based build system
Other
616 stars 218 forks source link

Creating a source distribution (sdist) #6

Closed patrikhuber closed 7 years ago

patrikhuber commented 7 years ago

Hi!

The setup.py script here is awesome and works great. I can successfully do pip install .\myproject to install locally and cd myproject && python setup.py bdist_wheel to create a wheel to distribute for the current platform. However what doesn't really work is creating a source distribution (sdist) so others can build it from pypi when a wheel is not available (or on Linux). python setup.py sdist runs and creates a .tar.gz, but it doesn't contain any source or CMake files so obviously it can't build. I read that there's different ways of including files in an sdist but I can't really figure out how to go on in the case of a CMake project like this. Has any of you worked with that before and encountered this issue?

Thanks!

dean0x7d commented 7 years ago

sdist should work already. This repository is tested that way. The non-python files which are included in the distribution need to be specified in the MANIFEST.in file. Maybe this file is missing in your case or doesn't list all the required files?

patrikhuber commented 7 years ago

Aah. Completely my bad, apologies. I was actually looking for a file like that in this repo but must have overlooked it. Thanks, working great now!