self-contained-runnable-py
build
Our great sponsors
self-contained-runnable-py | build | |
---|---|---|
3 | 7 | |
- | 659 | |
- | 4.1% | |
- | 9.2 | |
- | 11 days ago | |
Python | ||
- | 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.
self-contained-runnable-py
-
Underappreciated Challenges with Python Packaging
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...
-
How to create a Python package in 2022
The title should be: How to create a "Python DISTRIBUTION package".
The term "python package" means something entirely different (or at the very least is ambiguous in a pypi/distribution context).
To add to the confusion, creating a totally normal, runnable python package in a manner that makes it completely self-contained such that it can be "distributed" in a standalone manner, while still being a totally normal boring python package, is also totally possible (if not preferred, in my view).
Shameless plug: https://github.com/tpapastylianou/self-contained-runnable-py...
-
Show HN: Hatch 1.0.0 – Modern, extensible Python project management
Shameless plug: I use my own template, which organises things as runnable projects.
https://github.com/tpapastylianou/self-contained-runnable-py...
It serves my purposes very well (which is creating projects that represent standalone experiments).
Sharing in case someone else here finds it useful.
More recently I've modified this a bit to also generate nice html reports straight from the __main__.py file, independently of the underlying python code, and use this as lab books (where each lab book contains a single analysis and its report). I'll upload this template separately when I find the time.
build
- How can I download a software for my user automatically?
-
Underappreciated Challenges with Python Packaging
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
-
"Even with --dry-run pip will execute arbitrary code found in the package's setup.py. In fact, merely asking pip to download a package can execute arbitrary code"
RE the dislike of a "third-party tool", what do you mean by this? All the major tools for packaging in Python are under the PyPA, e.g. - twine - build - hatch
-
'Python: Please stop screwing over Linux distros'
building wheels/sdists to upload or install: build
-
An Interactive Cheat Sheet That Just Gives You The Answer
python3 setup.py sdist bdist_wheel - no need for an sdist when building wheels, also I'd recommend using pypa/build instead.
-
How to Structure a Python AWS Serverless Project
The first step is to turn the internal package into a wheel (a *.whl file). We can use the build tool for this purpose. After installing build with pip we can run it as follows:
-
The future of Python build systems and Gentoo
Shouldn't https://github.com/pypa/build help? I don't think it has enough features yet but I was under the impression that was the distro solution.
What are some alternatives?
tox-poetry-installer - A plugin for Tox that lets you install test environment dependencies from the Poetry lockfile
gh-action-pypi-publish - The blessed :octocat: GitHub Action, for publishing your :package: distribution files to PyPI: https://github.com/marketplace/actions/pypi-publish
pip-tools - A set of tools to keep your pinned Python dependencies fresh.
installer - A low-level library for installing from a Python wheel distribution.
hatch - Modern, extensible Python project management
setuptools - Official project repository for the Setuptools build system
pip-audit - Audits Python environments, requirements files and dependency trees for known security vulnerabilities, and can automatically fix them
pyunifiprotect - Unofficial UniFi Protect Python API and CLI
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.
awesome-pyproject - An Awesome List of projects using the pyproject.toml Python configuration file.
pipx - Install and Run Python Applications in Isolated Environments
serverless-project-example - Example Python project using AWS serverless stack