This directory contains example configuration files that demonstrate various mxdev features.
- example.ini - Main mxdev configuration file demonstrating various features
- requirements-infile.txt - Example input requirements file
- constraints-infile.txt - Example input constraints file
To use this example configuration:
# From the example directory
cd example
# Run mxdev with the example configuration
mxdev -c example.ini
# This will:
# 1. Read requirements-infile.txt and constraints-infile.txt
# 2. Fetch source repositories defined in example.ini
# 3. Generate requirements-outfile.txt and constraints-outfile.txt
#
# Note: The example uses placeholder repositories that don't exist.
# Replace them with real repositories to actually run it.The [settings] section demonstrates:
- Input/Output files: Custom names for requirements and constraints
- main-package: Defining the main package being developed
- version-overrides: Overriding specific package versions from upstream constraints
- ignores: Excluding packages from constraints (e.g., your main package)
- default-target: Custom directory for checked out sources
- threads: Parallel fetching for faster checkouts
- Variable substitution: Reusable variables like
${settings:github}
Different package configurations showcase:
- foo.bar - Basic package with branch and extras
- plone.behavior - Shallow clone with
depth=1(useful for CI) - package.with.submodules - Git submodules with
submodules=recursive - package.not.in.root - Package in subdirectory using
subdirectory - package.skip.install - Clone only, skip pip install with
install-mode=skip - package.custom.location - Custom target directory with
target
[plone.behavior]
url = ${settings:github}plone/plone.behavior.git
depth = 1 # Only fetch latest commitOr set globally via environment variable:
export GIT_CLONE_DEPTH=1[package.with.submodules]
url = ${settings:github}orga/package.with.submodules.git
submodules = recursive # Options: always (default), checkout, recursiveFor monorepos where the Python package is not in the repository root:
[package.not.in.root]
url = ${settings:github}orga/monorepo.git
subdirectory = packages/mypackageJust clone the repository, don't install with pip (useful for configuration repositories):
[package.skip.install]
url = ${settings:github}orga/config-only.git
install-mode = skipInstall package with pip install -e PACKAGEPATH:
[foo.bar]
url = ${settings:github}orga/foo.bar.git
# install-mode = direct # This is the defaultOverride versions from upstream constraints files:
[settings]
version-overrides =
baz.baaz==1.9.32
somepackage==3.0.0Note: If using uv, use its native override support instead:
# Create overrides.txt with version overrides
uv pip install --override overrides.txt -r requirements-mxdev.txtExclude packages from constraints (useful for your main package):
[settings]
ignores =
my.mainpackage
package.to.ignoreDefine reusable variables in the settings section:
[settings]
github = git+ssh://[email protected]/
gitlab = git+ssh://[email protected]/
[foo]
url = ${settings:github}orga/foo.git
[bar]
url = ${settings:gitlab}company/bar.gitFor real production examples, see:
See the main README.md for complete documentation of all configuration options.