Underappreciated Challenges with Python Packaging

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Scout Monitoring - Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
www.scoutapm.com
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • flit

    Simplified packaging of Python modules

  • If it's pure Python, the only packaging file you need is `pyproject.toml`. You can fill that file with packaging metadata per PEP 518 and PEP 621, including using modern build tooling like flit[1] for the build backend and build[2] for the frontend.

    With that, you entire package build (for all distribution types) should be reducible to `python -m build`. Here's an example of a full project doing everything with just `pyproject.toml`[3] (FD: my project).

    [1]: https://github.com/pypa/flit

    [2]: https://github.com/pypa/build

    [3]: https://github.com/pypa/pip-audit

  • build

    A simple, correct Python build frontend (by pypa)

  • If it's pure Python, the only packaging file you need is `pyproject.toml`. You can fill that file with packaging metadata per PEP 518 and PEP 621, including using modern build tooling like flit[1] for the build backend and build[2] for the frontend.

    With that, you entire package build (for all distribution types) should be reducible to `python -m build`. Here's an example of a full project doing everything with just `pyproject.toml`[3] (FD: my project).

    [1]: https://github.com/pypa/flit

    [2]: https://github.com/pypa/build

    [3]: https://github.com/pypa/pip-audit

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • pip-audit

    Audits Python environments, requirements files and dependency trees for known security vulnerabilities, and can automatically fix them

  • If it's pure Python, the only packaging file you need is `pyproject.toml`. You can fill that file with packaging metadata per PEP 518 and PEP 621, including using modern build tooling like flit[1] for the build backend and build[2] for the frontend.

    With that, you entire package build (for all distribution types) should be reducible to `python -m build`. Here's an example of a full project doing everything with just `pyproject.toml`[3] (FD: my project).

    [1]: https://github.com/pypa/flit

    [2]: https://github.com/pypa/build

    [3]: https://github.com/pypa/pip-audit

  • Nuitka

    Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4-3.12. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.

  • mkdocs-material

    Documentation that simply works

  • This is an incredible example of organizing information well and making a case to a wide audience. It's difficult enough to shave all the yaks necessary to get a high-level view of all issues related to a problem, and to express all those problems in good writing is an additional tough challenge. These folks have done an amazing job at both.

    Shoutout to Material for MkDocs enabling the swanky theme and Markdown extensions. https://squidfunk.github.io/mkdocs-material/

  • Poetry

    Python packaging and dependency management made easy

  • pipx

    Install and Run Python Applications in Isolated Environments

  • As detailed in the other answers, there are two parts to this: 1) Creating a python package from your project (and possibly share this on pypi), and 2) Making this package available as an end-user application.

    For step 2 you can use nuitka or similar, but if your audience is somewhat developer-oriented, you can also propose for them to use pipx: https://github.com/pypa/pipx.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • self-contained-runnable-python-package-template

    This is a template for creating self-contained, runnable python projects in the form of a tidy, structured, runnable python package

  • The approach I prefer is to not mess with setuptools etc at all in the first place, and simply make a nice executable package.

    e.g. https://github.com/tpapastylianou/self-contained-runnable-py...

  • The approach I prefer is to not mess with setuptools etc at all in the first place, and simply make a nice executable package.

    e.g. https://github.com/tpapastylianou/self-contained-runnable-py...

  • psycopg2

    PostgreSQL database adapter for the Python programming language

  • Back when I used Psycopg2, there was no -binary package, so you'd get libpq set up similarly to pg-native. Docs say:

    > The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources.

    Relevant GitHub discussion: https://github.com/psycopg/psycopg2/issues/674

    I dunno, this seems worse to me.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • PyPy has been working for me for several years now

    4 projects | news.ycombinator.com | 30 May 2024
  • How to Create Virtual Environments in Python

    4 projects | dev.to | 9 Feb 2024
  • Boring Python: dependency management (2022)

    3 projects | news.ycombinator.com | 4 Feb 2024
  • Pipenv VS instld - a user suggested alternative

    2 projects | 9 Dec 2023
  • Managing dependencies - pipenv?

    1 project | /r/learnpython | 20 Sep 2023