Closed EricR86 closed 1 year ago
That's a clever idea. I've started on that here: https://github.com/deeptools/pyBigWig/pull/134
I can't say I'm very familiar with optional requirements in python, do you think what I've done there will suffice or do you have different suggestions there?
So I have some follow-up suggestions for this particular issue since having an optional build requirement, that when necessary for anything downstream, will unfortunately not work:
1.
aboveIt also worth noting that numpy.distutils
will be deprecated in Python 3.12 so unfortunately the build will eventually break as-is for users.
Would you be open to a pull request on this issue? Here's what I would suggest:
Github actions for:
I've recently done all of the leg work and research for this for a recent release of my own (except the numpy targeting).
These changes would likely update the build mechanisms to use the new build frontend with pyproject.toml and keeping setuptools as the build backend.
@dpryan79 Would you be willing to consider a pull request to outline what @EricR86 suggests above? We want to use pyBigWig as a new transparent backend for Genomedata to use bigWig data without conversion, but this issue is keeping us from continuing to have a simple way of installing via PyPI. Thanks for the great package!
The wheels for this should now resolve this issue. If not, let me know.
There's an issue when
numpy
features are necessary for downstream packages ofpyBigWig
.The current
setup.py
checks thatnumpy
is currently in the python path to build the necessary extension. There is currently no way of ensuring numpy is on the python path whenpyBigWig
is installed as a dependency in another package. Bothsetup_requires
andbuild_requires
is not sufficient since it covers only the current package and not its dependencies. Even ifnumpy
manages to technically get installed beforepyBigWig
when dependencies are installed it is still not sufficient.Ideally it would be great to have
numpy
features available through something likeextra_requires
providing an optional dependency. Ideally being able to specify something likepyBigWig[numpy]
.Currently the only workaround is to ensure that numpy is installed first to the environment, then pyBigWig or any package that is downstream of it.
Thanks for your time.