3 ms·
Last I checked, and I could be missing something, PyPA doesn’t say how to package extensions using the new pyproject.toml style. I happen to be using SWIG (whic
by avidphantasm 4y ago
Last I checked, and I could be missing something, PyPA doesn’t say how to package extensions using the new pyproject.toml style. I happen to be using SWIG (which I inherited), which suggests the use of setup.py alone. I just haven’t had time to figure out the right path.
- blooalien 4y agoI dunno about using it with SWIG but I've had a pretty good experience using Poetry [1] for pure Python stuff myself. That uses pyproject.toml to declare all your project's dependencies, but no idea if it can be used with SWIG or not. I'd have to research it… [1]: https://python-poetry.org/ https://python-poetry.org/ Edit: Some quick cursory research seems to indicate I'd have to do some custom scripting to integrate SWIG into the process.
- filmor 4y agoPoetry is currently not useful for extensions: https://github.com/python-poetry/poetry/issues/2740 https://github.com/python-poetry/poetry/issues/2740
- filmor 4y agoYou can migrate a lot out of your setup.py into the pyproject.toml nowadays (https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html https://setuptools.pypa.io/en/latest/userguide/pyproject_con...).
- xapata 4y agoWouldn't you make a wheel?
- blooalien 4y agoIndeed… That does seem to be the best way to go about this particular task.
- ihusasmiiu 4y agoI don't genuinely understand what's wrong with setup.py and why people wouldn't just use setuptools, as it is even suggested by PyPA. IMHO Python should improve what it already has instead of pushing the usage of third party tools for a core component such as packaging. For all my Python projects I just use setuptools and the built-in venv module for isolation. What I feel it's really missing is an official way to have multiple Python version installed.
- nine_k 4y agoIsn't installing different versions an OS concern, not the Python's concern? I bet Debian and NixOS have very different takes on that, to say nothing of macOS and Windows. I also suppose that pyenv and poetry exist and solve that to a reasonable extent.
- ihusasmiiu 4y agoOne could say that providing Python modules is an OS concern as well. Debian IMHO has the worst take on that (see the venv module). Pyenv definitely solves it, but I talked about an officially supported solution.
- angrais 4y agopyenv will solve your multiple python on one machine problem :)
- Doxin 4y ago> What I feel it's really missing is an official way to have multiple Python version installed. Install them into different directories. There's nothing about python that makes this at all hard or even tricky.