Specifying Installation Requirements for Python Projects
python.org
python.org
For instance you should be able to install a numpy that is compiled to take advantage of your specific CPU. You should be able to pick at install time which one you want WITHOUT patching the the source code directory in any way that would make it back to version control.
In python I would create different requirements files together with freeze versions of those. One could contain the standard "numpy" and another would be "numpy @ my-custom-built-numpy-url". I haven't tried it and don't know how it would work in practice.
This doesn't allow you to use an alternative index, but it does allow you to override packages that restrict their dependencies versions too strictly
I suspect it's the features of the BLAS that will matter, though, a lot more than Numpy itself. The Numpy build system by default prefers MKL, OpenBLAS, then ATLAS, and I don't remember what after that, and it's up to you to compile those with the features you need.
I didn’t feel in control of Python builds until I had a wheels only policy. (For one things you can download about 2% of a wheel and get the dependencies to put into an SMT solver and globally solve the dependencies before you build anything. pip, poetry and similar systems use eggs and have to run setup.py to figure out deps which means they solver locally and eagerly and back themselves into corners that they may or may not be able to get out of.)
If I have to build from source I want to build a wheel, archive it, then reference the wheel in my repository. I don’t quite have the tooling to make it as easy as it really is.
So use https://github.com/mamba-org/mamba , which is an alternative client to conda and a million times faster. (If you are creating environments more than once per month or so).
What does conda give you that is so much better than venvs?
Poetry feels better, if only because it separates out explicit vs transitive dependencies.
On the distribution side, we are a small academic group that provides a niche, binary, scientific package that has quite a few binary dependencies (things like hdf, netcdf, etc.). We do not have the human effort to provide support for different distributions of Python, but it is very easy for us to say it will work if you use Anaconda with this environment on multiple OS's.
Since this PEP is a draft, any comments/thoughts about naming the directory that stores lock files `pyproject-lock.d`? Is it normal to end a directory name with `.d`?
There's probably a more specific convention so I'll await murphy's law.
Debian makes good use of it but i found that it introduces a smaller problem of ordering (which of the app’s setting to apply firstly for that subsystem’s dot-d collections of apps’ settings.
But such conflict of inter-app configuration settings is seemingly rare and often best done directly into such subsystem’s own main config settings.
Packaging has long been a weaker suit for python. As with so many other language features (e.g. dataclasses) python seems to let a bunch of art settle in the wild and then offer a nicely refined PEP to capture and implement it.