Skip to main content

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

  1. Automatic uv Source Mapping It natively configures the [tool.uv.sources] table in your pyproject.toml. It handles mxdev's absolute vs relative directories and automatically respects the install-mode setting (editable, fixed, or skip). It perfectly supports mxdev subdirectory parameters too.

    [tool.uv.sources]
    "plone.app.discussion" = {path = "sources/plone.app.discussion", editable = true}
    
  2. Smart Dependency Injection The hook safely inserts your checked-out packages directly into your [project] dependencies array.

    It implements strict PEP 503 normalization (converting -, _, and . equivalently) to intelligently ensure packages aren't duplicated, even if the dependency is already specified in your pyproject.toml with version specifiers or extras.

    [project]
    dependencies = [
        "plone.app.discussion"
    ]
    
  3. Format Preservation Built on tomlkit, it safely updates pyproject.toml while perfectly preserving all your existing user formatting, arrays, spacing, and comments.

Metadata

Release files for mxdev-uv-pyproject-updater 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mxdev-uv-pyproject-updater 0.1.0
File Size Uploaded
mxdev_uv_pyproject_updater-0.1.0.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mxdev-uv-pyproject-updater 0.1.0
File Interpreter ABI Platform
mxdev_uv_pyproject_updater-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / mxdev_uv_pyproject_updater-0.1.0.tar.gz

Download URL mxdev_uv_pyproject_updater-0.1.0.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cc0cffa2963542f7bd41dd313b0bbc2d85a1ac457802a6f0824e10ce97263cb7
BLAKE2b-256 checksum
How to use checksums
57daed998e1703bc955f76f42632a1759ec2cafabd5cce8191b25504155f07f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release files / mxdev_uv_pyproject_updater-0.1.0-py3-none-any.whl

Download URL mxdev_uv_pyproject_updater-0.1.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4426e277bb57d3006b102630c1a22f95566ce4c60da0e5d94c35e7c07e6f27c0
BLAKE2b-256 checksum
How to use checksums
c02117abb4be20f22043bc67906bd9cfb65f8b8a6e87ac5b42ea041f3e39d3a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page