Live data from Hacker News

How to make a Python package in 2021

antonz.org

211–215 of 215 posts

Re: How to make a Python package in 2021

#211
post #208
post #90

Earlier quoted context omitted.

The leadership was that the science community would benefit from a science-specific tool, like Conda, and that making one ring to rule them all would be too difficult. Also, yes, Guido and many other early contributers have been been active for 30ish years.

Conda isn't really science specific, just like pip isn't webdev specific.

The result isn't, but the motivation was. And have you noticed who is using which tool?

Re: How to make a Python package in 2021

#212

Earlier quoted context omitted.

I sympathize. It is unfortunate that the python community never settled around a tool like leiningen for clojure or cargo for rust or npm for node. What we saw with npm was the entire community iterating towards a feature set and everyone reaping the benefits automatically with npm updates. package-lock.json is a good example of this.

I think the Python community have largely settled on pip, just like the JavaScript community have mostly opted for npm. Personally I much prefer pip over npm, it feels much more polished.

but pip isn't enough and not exactly user friendly

Re: How to make a Python package in 2021

#214
post #3

Just use Poetry [1]. It's popular and works well. [1] https://python-poetry.org/

`poetry` and `pipenv` are both so much slower than `pip-compile` for me (there are many open issues for both complaining about lock speed), and manage to update locked dependencies half the time despite me asking them not to with e.g. `poetry lock --no-update`.

Re: How to make a Python package in 2021

#215

Earlier quoted context omitted.

Where is there a comprehensive poetry packaging tutorial?

Right here: poetry build -f wheel poetry publish You asked for packaging, and that is pretty much it. Of course, setting up a project and its dependencies take a bit more work; the basic intro for that is here: https://python-poetry.org/docs/basic-usage/

That is fantastic.
Post reply on HN