I'm following the python documentation about "distributing packages using setuptools". It doesn't mention what to do if a python package you want to include in your install_requires
requires a system installation. For example:
I'd like to include the package pysoundfile, but this requires me to install libsndfile1
via my system package manager, e.g. sudo apt-get install libsndfile1
.
I've got as far as understanding I need to make a binary distribution, given advice in the docs here, but that sends me to the docs listed above.
How do I automate this process such that users of my package can simply pip install my_package
and not have to apt-get install libsndfile1
?
EDIT: My question is not linux specific so apt dependies for pypi package does not solve my question. To clarify: my users will be cross-platform, and I want everyone to be able to pip install my_package
regardless of their platform. Is this possible?
EDIT 2: Ah, hmm, sorry I missed this bit from the answer:
If you want to distribute Python package from PyPI there is no way for the package to declare system dependencies. The only way to handle this is to document dependencies and let the user handle them.
So, I guess if that is true, that is my answer... i.e. it is not possible to make a pypi package that any user can simply pip install
if it requires non-python packages.
Full disclosure: this question exists on the Software Engineering Stack Exchange with no answer - the site does not appear very active. If you think this question would be more appropriate on another Stack Exchange site, please feel free to direct me to it and I will delete the question here...