News for hackers. Stuff that matters.
Re:How to make a Python package in 2021 by neolog on Wednesday April 07, 2021 @11:16PM (#26734727)
> You don't need to solve all those problems at once.

Why spend time tweaking the setup when you can just get it right in the first place with less work?

Re:How to make a Python package in 2021 by zomglings on Wednesday April 07, 2021 @11:21PM (#26734753)
Do you recommend poetry?

I've been meaning to try it but haven't had the time to migrate an existing project to poetry.

Re:How to make a Python package in 2021 by atoav on Thursday April 08, 2021 @03:31AM (#26736058)
I used poetry for multiple projects already and I quite like it because it makes version management really straightforward and you can just go like

  poetry new foo
And it will setup all the basic stuff for you right away. Having all the project dependecies and Metadata in pyproject.toml makes sense and reduces cognitive overload. Having poetry manage your venvs autmagically is a good extra.

There is still room for improvement, e.g. I had some trouble with their install script at times (python vs python3)

Re:How to make a Python package in 2021 by neolog on Wednesday April 07, 2021 @11:28PM (#26734804)
Yeah it's pretty good. There are plenty of problems and holes of course, but for most pure-Python packages it does a nice job most of the time.

If you're an expert, you can do it with setup.py or setup.cfg, but I don't think it's normally worth the trouble.