sigstore-python
publishing-python-packages
sigstore-python | publishing-python-packages | |
---|---|---|
4 | 2 | |
210 | 75 | |
0.5% | - | |
9.3 | 0.0 | |
7 days ago | 18 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sigstore-python
-
How to improve Python packaging, or why 14 tools are at least 12 too many
You could use `pip-compile` if you want full pinning. That's what we do on another project -- we use GitHub Actions with `pip-compile` to provide a fully frozen copy of the dependency tree for users who'd like that[1].
In the context of `pip-audit`, that makes a little less sense: most of our dependencies are semantically versioned, and we'd rather users receive patches and fixes to our subdependencies automatically, rather than having to wait for us to release a corresponding fix version. Similarly, we expect users to install `pip-audit` into pre-existing virtual environments, meaning that excessive pinning will produce overly conservative dependency conflict errors.
[1]: https://github.com/sigstore/sigstore-python/tree/main/instal...
-
Use `Python -m Pip`
The conflicting advice is a serious problem.
I hope you'll forgive me for adding one additional piece of advice: for many Python packages, the only packaging metadata you need is `pyproject.toml`. You don't even need `setup.py` anymore, so long as you're using a build backend that supports editable installs with `pyproject.toml`.
Here's an example of a Python package that does everything in `pyproject.toml`[1]. You should be able to copy that into any of your projects, edit it to match your metadata, and everything will work exactly as if you have a `setup.cfg` or `setup.py`.
[1]: https://github.com/sigstore/sigstore-python
-
Bundling binary tools in Python wheels
You're right, both the infrastructure and metadata for cryptographic signatures on Python packages (both wheels and sdists) isn't quite there yet.
At the moment, we're working towards the "e2e" scheme you've described by adding support for Sigstore[1] certificates and signatures, which will allow any number of identities (including email addresses and individual GitHub release workflows) to sign for packages. The integrity/availability of those signing artifacts will in turn be enforced through TUF, like you mentioned.
You can follow some of the related Sigstore-in-Python work here[2], and the ongoing Warehouse (PyPI) TUF work here[3]. We're also working on adding OpenID Connect token consumption[4] to Warehouse itself, meaning that you'll be able to bootstrap from a trusted GitHub workflow to a PyPI release token without needing to share any secrets.
[1]: https://www.sigstore.dev/
[2]: https://github.com/sigstore/sigstore-python
[3]: https://github.com/pypa/warehouse/pull/10870
[4]: https://github.com/pypa/warehouse/pull/11272
- Project sigstore (free software signing service) just released a library to sign and verify python packages
publishing-python-packages
-
How to improve Python packaging, or why 14 tools are at least 12 too many
I don't agree with all the points from the article, but I do agree there is a depth of learning to be had about creating packages (and doing it repeatably/scalably). I wrote a book about creating Python packages that just came out: https://pypackages.com
Even this book doesn't cover all options in each area, and it skips almost wholly over conda because I have no personal experience using it. conda and the work in the scientific community adds complexity both to the creation and the consumption side of packaging, and that's one area I'm not sure this post covers all the nuance of when considering how a "one size fits all" solution might work in practice.
-
Publishing Python Packages: available now!
If reading code is more your thing, you might want to check out the code companion.
What are some alternatives?
sampleproject - A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects"
pigar - :coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)
pythonfluente2e - Python Fluente, Segunda Edição
Nuitka - Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
roadmap - Public roadmap for the Poetry package manager
auditwheel - Auditing and relabeling cross-distribution Linux wheels.
tox-pin-deps - Run tox environments with strictly pinned dependencies (and no project or code changes).
pip-audit - Audits Python environments, requirements files and dependency trees for known security vulnerabilities, and can automatically fix them
chainjacking - Find which of your direct GitHub dependencies is susceptible to RepoJacking attacks
globus-timer-cli - CLI for interacting with the Timer API
nix-cde - Nix Common Development Environment