This project has been archived by its maintainers, and is no longer receiving any updates.
Package Scripts
Scripts for frequently performed Python development / maintainer tasks.
- build - Build and (optionally) publish a package to PyPI
- create-service - Generate and install a systemd unit file with the provided parameters
- format - Run isort, ruff format, and ruff check.
- bump-version - Update pyproject.toml with a new version, create git tag, push upstream
- get-pr-link - Prints the GitHub page comparing your current branch to the default branch (so you can create a PR).
Installing
Create Virtual Environment
mkdir -p ~/.local/opt/package-scripts
python3 -m venv ~/.local/opt/package-scripts
source ~/.local/opt/package-scripts/bin/activate
Set File Prefix
- File prefixes should match the regex pattern
[\w-]+. - With a prefix of 'run', the resulting files will be:
run-build,run-format,run-bump-version,run-create-service.
export SCRIPT_PREFIX="run"
Install PyPI Package
PACKAGE_SCRIPT_PREFIX="${SCRIPT_PREFIX:-run}" pip install --no-cache-dir package-scripts
Ensure Scripts are in PATH
Do one of the following:
- Option 1 - Symlink the scripts from the virtual environment to any location already in
PATH
for script in build format bump-version create-service; do
ln -s "$HOME/.local/opt/package-scripts/bin/${PACKAGE_SCRIPT_PREFIX}-${script}" "$HOME/.local/bin/${PACKAGE_SCRIPT_PREFIX}-${script}"
done
- Option 2 - Copy the generated script files to a location in
PATH
cp "$HOME/.local/opt/package-scripts/bin/${PACKAGE_SCRIPT_PREFIX}-"* "$HOME/.local/bin/"
- Option 3 - Add the virtual environment's bin directory to
PATH. This has the side effect of including every other executable file in that directory to the search path, so be warned.
# Append to PATH rather than prepend so that the executables we add will be used only if they don't exist elsewere.
echo "export PATH=$PATH:$HOME/.local/opt/package-scripts/bin" >> ~/.bashrc
Install Shell Completion
This will generate a file in the local shell completion directory
for script in build format bump-version create-service; do
${PACKAGE_SCRIPT_PREFIX}-${script} --install-completion
done
Metadata
Release files for package-scripts 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| package_scripts-0.4.0.tar.gz | 12.9 kB | Without provenance | Details for package_scripts-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| package_scripts-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for package_scripts-0.4.0-py3-none-any.whl |
Total release size: 28.3 kB
Release files / package_scripts-0.4.0.tar.gz
| Download URL | package_scripts-0.4.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4657376c47f76cf11df7710efa5da1c91916e127f9f314f9e17e3537d6762eb
|
|
BLAKE2b-256 checksum How to use checksums |
5cf74f7ad507e777da64458b9d87d856b8f58b99ab356785e285608d782978eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / package_scripts-0.4.0-py3-none-any.whl
| Download URL | package_scripts-0.4.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97ca00a371e5c0dc3ab481d92db15c95ccb5d87a4990009fe55fab7c515bf7fd
|
|
BLAKE2b-256 checksum How to use checksums |
147542bdc424e5c75104b74467b6c639d50881014e9a48057d56b941396c846f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for package-scripts 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.