Skip to main content

make self-extracting virtualenvs

Project description

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carton-0.2.1.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file carton-0.2.1.tar.gz.

File metadata

  • Download URL: carton-0.2.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for carton-0.2.1.tar.gz
Algorithm Hash digest
SHA256 24abad2ebce716cd5312f0d15c6c54e1962bce7b31a43af0bdd2fff56703ff0b
MD5 7c9d4474b8347d25c9209465686423d6
BLAKE2b-256 d8b79eec1ece8605f0d8fe4377a5c2e9acd177dbdd67f51b7035fa1c4f14684b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page