Skip to main content

A Python library for creating "editable wheels"

This library supports the building of wheels which, when installed, will expose packages in a local directory on sys.path in "editable mode". In other words, changes to the package source will be reflected in the package visible to Python, without needing a reinstall.

Usage

Suppose you want to build a wheel for your project foo. Your project is located in the directory /path/to/foo. Under that directory, you have a src directory containing your project, which is a package called foo and a Python module called bar.py. So your directory structure looks like this:

/path/to/foo
|
+-- src
|   +-- foo
|   |   +-- __init__.py
|   +-- bar.py
|
+-- setup.py
+-- other files

Build your wheel as follows:

from editables import EditableProject

my_project = EditableProject("foo", "/path/to/foo")
my_project.add_to_path("src")

# Build a wheel however you prefer...
wheel = BuildAWheel()

# Add files to the wheel
for name, content in my_project.files():
    wheel.add_file(name, content)

# Record any runtime dependencies
for dep in my_project.dependencies():
    wheel.metadata.dependencies.add(dep)

The resulting wheel will, when installed, put the project src directory on sys.path so that editing the original source will take effect without needing a reinstall (i.e., as "editable" packages). The project is exposed on sys.path by adding a single .pth file, named after the project, into the wheel.

For more details, including how to control what gets exposed more precisely, see the documentation.

Note that this project doesn't build wheels directly. That's the responsibility of the calling code.

Python Compatibility

This project supports the same versions of Python as pip does. Currently that is Python 3.7 and later, and PyPy3 (although we don't test against PyPy).

Metadata

Release files for editables 0.3

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

Source distribution (sdist)

Source distribution for editables 0.3
File Size Uploaded Provenance Actions
editables-0.3.tar.gz 4.7 kB Without provenance Details for editables-0.3.tar.gz

Built distribution (wheel)

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

Total release size: 9.4 kB

Release files / editables-0.3.tar.gz

Download URL editables-0.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
167524e377358ed1f1374e61c268f0d7a4bf7dbd046c656f7b410cde16161b1a
BLAKE2b-256 checksum
How to use checksums
01b0a2a87db4b6cb8e7d57004b6836faa634e0747e3e39ded126cdbe5a33ba36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/31.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.4.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.3

Release files / editables-0.3-py3-none-any.whl

Download URL editables-0.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee686a8db9f5d91da39849f175ffeef094dd0e9c36d6a59a2e8c7f92a3b80020
BLAKE2b-256 checksum
How to use checksums
ef8c87276afb1ba3193c4c05be83965a1e69b8a14821ce6d688464071b179383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/31.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.4.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.3

Security for editables 0.3

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.

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