4 ms·
Very good summary of the situation, I hope something good will come out of it. I've used pipenv, pyenv, poetry and settled for my own use-cases on just pip wit
by woolion 4y ago
Very good summary of the situation, I hope something good will come out of it.
I've used pipenv, pyenv, poetry and settled for my own use-cases on just pip with virtualenvwrapper.
So any program goes into its dedicated folder with requirements and virtualenv.
However there's something that I've never managed to get working.
You have say a 3.8 virtualenv, and package file mentions python should be >=3.8.
But when calling python -m build, the build process creates a new environment using the system python.
So if you are on an old system that is on Python 3.7, the resulting package cannot be installed because of the inconsistency between declared python version and the one that has been used.
It may be a very stupid problem, but I haven't been able to find any documentation for it.
Any search engine is just too happy to throw any 'python packaging result' before anything so specific.
Maybe I should use one other tool for that? But there's no clear (default?) path documented.
- ivoflipse 4y agoYou could look into cibuildwheel, to have more control over what Python versions are used to build a wheel, but as the name implies not a great solution for running it locally. Otherwise you'll have to be rather specific about what Python interpreter to use. For example using the python launcher for Linux (https://github.com/brettcannon/python-launcher https://github.com/brettcannon/python-launcher). Looking through the docs of pdm, Hatch or Poetry, I can't really find a definitive answer if they will use the Python version you specify. They all at least need to be able to locate the correct Python version in order to do so. It would be great if managing Python versions was something that came along with Python, so that these tools could rely on it more.