Collection of convenience functions to patch `pyproject.toml` in place
Project description
pyproject-patcher
This package is an attempt to make it a little easier to patch
pyproject.toml
in place.
It is mainly useful for maintainers of system packages.
If you’re not a maintainer of system packages, or if you don’t know
what that means, then pyproject-patcher
is probably not for you.
Features
-
Hard code a version number into
project.version
-
Disable all invocations of the dynamic version generator
setuptools-git-versioning
-
Remove dependency to
setuptools-git-versioning
frombuild-system.requires
Installation
Installing from PyPI
To install pyproject-patcher from PyPI, open a shell and run:
pip install pyproject-patcher
If that doesn’t work, try:
python3 -m pip install pyproject-patcher
Installing from the AUR
Direct your favorite
AUR helper to the
python-pyproject-patcher
package.
Usage
See USAGE.md
for details.
Contributing to pyproject-patcher
See CONTRIBUTING.md
.
License
Copyright (c) 2024 Claudia Pellegrino
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. For a copy of the License, see LICENSE.
Example
from pyproject_patcher import patch_in_place
with patch_in_place('pyproject.toml') as toml:
toml.set_project_version('1.2.3')
toml.remove_build_system_dependency('setuptools-git-versoning')
toml.remove_setuptools_git_versioning()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyproject_patcher-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b42dd2f471c1230bc3cf58a77e1ed7e508a3ede5372abab5bbc5945923a35384 |
|
MD5 | 1fc10a2deef420ad2c5f22f74b25d0b6 |
|
BLAKE2b-256 | 011fcf9a11dc320f228a3ef1a02c0dd86711610b8caa3bb193d80f563a675719 |