Live data from Hacker News

What the Heck Is Pyproject.toml?

snarky.ca

11–20 of 199 posts

Re: What the Heck Is Pyproject.toml?

#11

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

I agree. This really seems like high impact too. A first party, supported solution would solve this mess. Getting the Python dependency build story under control I would include in this category. In this department, I think Conda shows the way. They leverage Azure Pipelines to build much of the c dependencies ahead of time, and just send binaries down the pipe (at least, that's the high level overview as I understand it).

I can't see a world where the Python Software Foundation can't get support for this, I think they have the contacts at the big companies to get it funded.

The lead Python has on machine learning, data science, and scientific computing won't last forever (though, I think its safe to say no matter what, it ain't going anywhere.

Re: What the Heck Is Pyproject.toml?

#12

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

Poetry is a modern packaging system for Python. It's really good. I hope everyone converges on it.

http://python-poetry.org/

Re: What the Heck Is Pyproject.toml?

#14

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

FWIW, the issue you linked to was closed in favor of https://github.com/pypa/pipenv/issues/3369.

Looks like Canonical is paying him now.

Re: What the Heck Is Pyproject.toml?

#15
post #3

The thing i have yet to reliably figure out is this (i live in the science part of python): without a setup.py, how do I: from Cython.Build import cythonize import numpy as np import versioneer setup(..., version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), ext_modules=cythonize(extensions), include_dirs=[np.get_include()], ...) I'm 100% on board with not having executable configuration files, except…

All of those setup options are now setup.cfg options: https://docs.python.org/3/distutils/configfile.html At least, that's supposed to be the case; I am not 100% certain that it always is. However, even so, AFAIK setup.cfg does not directly support using third-party libraries to compute the setup options, as your setup.py does. The only workaround I'm aware of for that if you want to get rid of setup.py is to have a…

I get the idea -- but, how do I tell Cython "it's time to compile things now" from a file I can't execute?

Re: What the Heck Is Pyproject.toml?

#16
post #6

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

I haven't looked much into it myself, but I've heard good things about Poetry [0]. 0: https://python-poetry.org/

Poetry is good, but you should be aware that people with legacy versions of pip (I think before 19, see PEP 517) won't be able to pip install from your repository directly. That means anyone using pip installed with their package manager (up to the lastest version of Debian/Ubuntu in fact, which only provide v18). This doesn't affect installs from PyPI of course. So either you just accept this, or you also maintain a setup.py file as well. That's fine, but Poetry doesn't automatically bump version numbers in setup.py (as far as I know) so you need to do a couple of extra steps when you build.

On the other hand, setting up a deploy key to PyPI and then using poetry build, poetry publish is very easy compared to using twine which I found often did daft things like upload mixed versions to PyPI unless the build directory was clean. Poetry seems to handle that a lot better.

Re: What the Heck Is Pyproject.toml?

#17

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

Poetry is a modern packaging system for Python. It's really good. I hope everyone converges on it. http://python-poetry.org/

I just started up a project using this. It’s pretty good so far. The documentation on common tasks is a little bit lacking. VS Code integration is sort of broken in a few random ways (for example if I try and do a find all function definition it just hangs). I also wish there was a npm style script section in the definitions. I do think it really just works though and I think it’s a great solution compared to requirements.txt.

Re: What the Heck Is Pyproject.toml?

#18

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

I totally agree with this. Don't forget all the bespoke systems that companies end up implementing because they either aren't aware of those other projects or they started doing it before some of those other projects existed or because they aren't a fit.

Re: What the Heck Is Pyproject.toml?

#19
post #17

Earlier quoted context omitted.

Poetry is a modern packaging system for Python. It's really good. I hope everyone converges on it. http://python-poetry.org/

I just started up a project using this. It’s pretty good so far. The documentation on common tasks is a little bit lacking. VS Code integration is sort of broken in a few random ways (for example if I try and do a find all function definition it just hangs). I also wish there was a npm style script section in the definitions. I do think it really just works though and I think it’s a great solution compared to require…

> I also wish there was a npm style script section in the definitions.

Is that like [tool.poetry.scripts] ?

Re: What the Heck Is Pyproject.toml?

#20

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

I personally don't think that comic is fair to hold against pip or the packaging ecosystem. I did a separate post on deconstructing it at https://snarky.ca/deconstructing-xkcd-com-1987/.
Post reply on HN