Just use Poetry [1]. It's popular and works well. [1] https://python-poetry.org/
How to make a Python package in 2021
41–50 of 215 posts
Re: How to make a Python package in 2021
#42 pip install git+https://myg.it/repo.gitRe: How to make a Python package in 2021
#43I’m always glad to see Make being used. It’s such a powerful and simple tool that usually does the job just as well as more “bespoke” CLI’s for various frameworks and languages
Here's an example of how I like to do my "bash scripts that sorta work like make": https://github.com/francislavoie/laravel-websockets-example/... basically each function is a "command", so I do like "./utils start" or whatever.
Re: How to make a Python package in 2021
#44Honestly, I don't even bother "packaging" Python tools anymore. Just put it in all in a git repo, and pip can install using pip install git+https://myg.it/repo.git
More controversially: With a few (<10) lines of code in your setup file, you can make an install-able module out of jupyter notebooks.
Re: How to make a Python package in 2021
#45Earlier quoted context omitted.
TBH as someone trying to use Python professionally it is extremely frustrating that basic things with regards to package management are something you have to iterate towards, as opposed to just being obvious and default.
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.
Leiningen is the weird one where people did actually settle fairly well around an unofficial solution in the absence of an official one. I think the norm with languages that forego official tooling is closer to what we've seen in Python.
Re: How to make a Python package in 2021
#46Earlier quoted context omitted.
Iteratively. You don't need to solve all those problems at once. Version pinning can be done in setup.py using the same syntax you would see in a requirements.txt file. You should be very conservative when pinning versions in a library, though. You can lean on your ci tool (eg. Github actions) to handle testing, hash checking, credential management, etc. But I recommend all of this start as a bunch of locally runnabl…
TBH as someone trying to use Python professionally it is extremely frustrating that basic things with regards to package management are something you have to iterate towards, as opposed to just being obvious and default.
python is a mature, old, software system. three times older than go or rust. way older than zig. these modern languages have learned from the field as a whole and implemented tools that people are taking for granted nowadays.
as with any mature software system, people & companies have established their preferred ways of doing things. it's going to be hard to have the language council dictate ways of doing things.
i would recommend going simple and using the standard set of modules until poetry or whatever gets into it.
Re: How to make a Python package in 2021
#47Re: How to make a Python package in 2021
#48Re: How to make a Python package in 2021
#49Just use Poetry [1]. It's popular and works well. [1] https://python-poetry.org/
Re: How to make a Python package in 2021
#50Just use Poetry [1]. It's popular and works well. [1] https://python-poetry.org/
How does it compare to pipenv?