Re: Rasterio and pip 19

Joris Van den Bossche

Op vr 25 jan. 2019 om 22:45 schreef Sean Gillies via Groups.Io <>:
I'm hesitant to pin numpy in pyproject.toml because the right version sort of depends on your Python version. However, there's a potential stumbling block here that needs to be addressed. If anybody has more experience and wisdom to share about the new features of pip, I'm all ears.

You can (nowadays) specify the numpy version depending on the python version in pyproject.toml, which should make this possible. Something like:
    "numpy==1.8.2; python_version<='3.4'",
    "numpy==1.9.3; python_version=='3.5'",
    "numpy==1.12.1; python_version=='3.6'",
    "numpy==1.13.1; python_version>='3.7'",
In principle we should always pin the numpy version to the oldest supported version (if using build isolation), as otherwise using the built package in an environment with another numpy version breaks, as you explained.

Last year, we added a pyproject.toml to pandas, but it gave a lot of problems (, related to the fact that the above python-dependent numpy version was not possible yet (environment markers in pyproject.toml files were not yet supported at that time) + build dependencies needed to be installed as wheels instead of from source (which can give problems on certain platforms for which there are no wheels; this is also fixed in the meantime in pip I think). So in the end we decided to remove it again for the next release.
But it seems we should maybe look into adding it again.



Join to automatically receive all group messages.