Skip to main content

make a self-extracting virtualenv from directories or URLs of packages

To package up all files in a virtualenvs source directory (e.g.):

python path/to/carton.py myproject project/src/*

This will create a self-extracting file, myproject.py, that will unfold a virtualenv with the specified packages setup for development

The sources may be directories, local or HTTP-accessible tarballs, or ordinary files. The setup.py`s found in the `src directory after extraction will be run (via python setup.py develop) in the order they are provided. This makes it possible to have completely local dependencies (without touching the net) by correctly specifying the source order. If a setup.py is overwritten from a later source, it will not be rerun (known limitation).

The extracted virtualenv will be created in the current directory and will have the same name as provided initially (e.g. myproject) unless –env is specified.

Normally, the entire contents of source directories are compressed and packaged as-is. When running with the –package flag, a source tarball is produced via python setup.py sdist if the directory contains a top-level setup.py.

Since directories are compressed as-is, portable file-based VCS repositories, such a mercurial and git, may be cartoned this way (though note that newer repositories may not be backwards-compatible with older clients).

Release files for carton 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 carton 0.3
File Size Uploaded
carton-0.3.tar.gz 5.7 kB Details

Release files / carton-0.3.tar.gz

Download URL carton-0.3.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1270dea881d52d503797a0fca6897d8229b05098404557d642e22a8d9c1477ab
BLAKE2b-256 checksum
How to use checksums
9b2b0bfc9e285e83dceefa0ca3abe21708b6bbba900bdded303f8c12373e5ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

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