An mxdev hook to update pyproject.toml for uv workflows
Project description
mxdev-uv-pyproject-updater
An mxdev extension hook that automatically updates pyproject.toml during the mxdev write phase to support uv workflows.
Installation
You must install this package in the same environment as mxdev.
If you are using uv to run mxdev globally, you can install the hook via uv tool install:
uv tool install mxdev --with mxdev-uv-pyproject-updater
Or if you are running mxdev via a local virtual environment:
uv pip install mxdev mxdev-uv-pyproject-updater
Usage
Because it registers an mxdev entry point, this hook runs automatically whenever you run mxdev. It will automatically detect packages defined in your mx.ini file and write the corresponding configuration to your pyproject.toml file.
Features
-
Automatic
uvSource Mapping It natively configures the[tool.uv.sources]table in yourpyproject.toml. It handlesmxdev's absolute vs relative directories and automatically respects theinstall-modesetting (editable,fixed, orskip). It perfectly supportsmxdevsubdirectoryparameters too.[tool.uv.sources] "plone.app.discussion" = {path = "sources/plone.app.discussion", editable = true}
-
Smart Dependency Injection The hook safely inserts your checked-out packages directly into your
[project]dependenciesarray.It implements strict PEP 503 normalization (converting
-,_, and.equivalently) to intelligently ensure packages aren't duplicated, even if the dependency is already specified in yourpyproject.tomlwith version specifiers or extras.[project] dependencies = [ "plone.app.discussion" ]
-
Format Preservation Built on
tomlkit, it safely updatespyproject.tomlwhile perfectly preserving all your existing user formatting, arrays, spacing, and comments.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mxdev_uv_pyproject_updater-0.1.0.tar.gz.
File metadata
- Download URL: mxdev_uv_pyproject_updater-0.1.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc0cffa2963542f7bd41dd313b0bbc2d85a1ac457802a6f0824e10ce97263cb7
|
|
| MD5 |
6ecf1bac488802388870b71421d112cc
|
|
| BLAKE2b-256 |
57daed998e1703bc955f76f42632a1759ec2cafabd5cce8191b25504155f07f8
|
File details
Details for the file mxdev_uv_pyproject_updater-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mxdev_uv_pyproject_updater-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4426e277bb57d3006b102630c1a22f95566ce4c60da0e5d94c35e7c07e6f27c0
|
|
| MD5 |
d4a66524dbb2665427f06a70a8717e0c
|
|
| BLAKE2b-256 |
c02117abb4be20f22043bc67906bd9cfb65f8b8a6e87ac5b42ea041f3e39d3a8
|