News for hackers. Stuff that matters.
Re:How to make a Python package in 2021 by goerz on Thursday April 08, 2021 @01:11AM (#26735287)
It's also not ready yet, missing critical features like editable installs. Right now, you still need a shim setup.py. Until pyproject.toml can actually replace setupy.py, I see little incentive to start using it: It's just one more file to add. The one exception is if the package actually has build requirements, e.g. for Cython modules.
Re:How to make a Python package in 2021 by zo1 on Thursday April 08, 2021 @02:36AM (#26735774)
The only reason we use pyproject.toml is because of the stupid black formatter that refuses to support setup.cfg, which every other python tool under the sun supports.
Re:How to make a Python package in 2021 by goerz on Thursday April 08, 2021 @02:52PM (#26742347)
Yeah, it's annoying. But Black has so little configuration that I'm ok with hardcoding command-line parameters in my Makefile/tox.ini/precommit hooks (`--skip-string-normalization --line-length 79`)
Re:How to make a Python package in 2021 by mixmastamyk on Thursday April 08, 2021 @04:22AM (#26736349)
There are other formatters, some may even be better.
Re:How to make a Python package in 2021 by cixinlui on Thursday April 08, 2021 @05:12AM (#26736682)
I don't recognize this. I use poetry all the time, without setup.py and the local installs are editable. I have published half a dozen packages which don't have a setup.py and they all work fine.
Re:How to make a Python package in 2021 by neolog on Thursday April 08, 2021 @08:01PM (#26745274)
You can't install a poetry package editably into another environment. It's really a missing feature in the pyproject spec. There's an open issue about it under one of the pypa repos. Someone just needs to do the work of implementing it in pip/setuptools.