Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

It builds on top of the idea to have stable version constraints and then develop from a VCS on top of it.

Other software following the same idea are mr.developer for Python’s zc.buildout or mrs-developer for NPM packages.

Overview

mxdev procedure is:

  1. Configuration is read,

  2. Requirements and constraints (given in configuration) are read.

  3. Sources from VCS are fetched into a target directory,

  4. Modified constraints (handled packages commented)/ requirements (handled packages as editable from sources) are written.

mxdev will not run pip for you!

Configuration

Given a requirements.txt (or similar named) file which itself references a constraints.txt file inside.

Create an INI file, like sources.ini in configparser.ExtendedInterpolation syntax.

The main section must be called [settings], even if kept empty. In the main sections the input and output files are defined.

requirements-in

Main requirements file to start with. This can be an URL too. Default: requirements.txt

requirements-out

Output of the combined requirements including development sources to be used later with pip install. Default: requirements-dev.txt

constraints-out

Output of the combined constraints. Default: constraints-dev.txt

default-target

Target directory for sources from VCS. Default: ./sources

default-position

Default position of pip install -e for sources from VCS in requirements-out. Install before or after requirements was processed. Default: after.

Additional, custom variables can be defined as key = value pair. Those can be referenced in other values as ${settings:key} and will be expanded there.

Subsequent sections are defining the sources.

[PACKAGENAME]

The section name is the package name.

url = URL

the URL to the source in VCS and must follow the pip install editable format. Attention, this differs from the format one copies from Github/Gitlab, etc. The URL is required.

branch = BRANCHNAME_OR_TAG

the branch name or tag to checkout. Defaults to main.

extras = EXTRA1,EXTRA2

Package extras to install. Default empty.

subdirectory = SUBPATH

For specifying the path to the Python package, when it is not in the root of the VCS directory. Default empty.

target

Target directory for source from this section. Default to target directory configured in main section [settings] default-target = value.

position

Position of pip install -e for this source in requirements-out. Install before or after requirements was processed. Default to position configured in main section [settings] default-position = value.

Usage

Run mxdev -c sources.ini.

Now use the generated requirements and constrainst files with pip install -r NEW_REQUIREMENTS_FILENAME.txt.

Example Configuration

This looks like so:

[settings]
requirements-in = requirements-infile.txt
requirements-out = requirements-outfile.txt
contraints-out = constraints-outfile.txt

# custom variables
github = git+ssh://git@github.com/

[foo.bar]
url = ${settings:github}orga/foo.bar.git
branch = fix99
extras = test,baz

Rationale

Problem

There is a constraint file like -c constraints.txt with a package foo.bar with a version pin. Then it is not possible to install this package in a requirements file editable like -r requirements.txt with -e git+ssh://git@github.com/orga/foo.bar.git@fix-99.

Idea

A pre-processor fetches (as this can be an URL) and expands all -c SOMEOTHER_FILE_OR_URL and -r SOMEOTHER_FILE_OR_URL files into one, filtering out all packages given in a configuration file. For each of those packages a -e ... entry is generated instead and written to a new TARGET.txt. The configuration is written in a file sources.ini in ExtendedInterpolation INI syntax (YAML would be nice, but the package must have as less dependencies as possible to other packages).

Trivia

Mx (generally pronounced like mix [mɪks], or [məks] in the UK) is meant to be a gender-neutral alternative to the titles Mr. and Ms. but also associates with mix.

Changelog

1.0.0a5 (2021-11-30)

1.0.0a4 (2021-11-29)

  • Fix: editables can be configured to be processed before or after initial requirements. [jensens]

1.0.0a3 (2021-11-23)

  • Fix #1: Re-run of pip vanishes comitted changes [jensens]

1.0.0a2 (2021-11-21)

  • Fix/simplify packaging. [jensens]

  • Implement subdirectory editable install [jensens]

  • Implement package extras [jensens]

1.0.0a1 (2021-11-21)

  • Initial work. [jensens]

Metadata

Release files for mxdev 1.0.0a5

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 1.0.0a5
File Size Uploaded Provenance Actions
mxdev-1.0.0a5.tar.gz 6.9 kB Without provenance Details for mxdev-1.0.0a5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mxdev 1.0.0a5
File Interpreter ABI Platform Actions
mxdev-1.0.0a5-py3-none-any.whl Python 3 none any Details for mxdev-1.0.0a5-py3-none-any.whl

Total release size: 13.2 kB

Release files / mxdev-1.0.0a5.tar.gz

Download URL mxdev-1.0.0a5.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8d3c0cfed791ac802b0d9285f94716bc0ab2160e48794e26837cf5b8cbdf1295
BLAKE2b-256 checksum
How to use checksums
243d00259497632772bcb0aeeead983b926ba284b9d39bb0432a5132d18a78e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

Release files / mxdev-1.0.0a5-py3-none-any.whl

Download URL mxdev-1.0.0a5-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57eef449affce089d1686cf1698102768eed0002b6de00700e589fcb2bbcbcf9
BLAKE2b-256 checksum
How to use checksums
8132d108ddddead31931075359b865a47d45cbb5f90b00a22a180be42d10be35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

Security for mxdev 1.0.0a5

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.

Release history Release notifications | RSS feed

This release
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