python distutils扩展以创建virtualenv构建的发行版。
bdist-venv2的Python项目详细描述
实现python distutilsbdist_venv2命令以创建virtualenv 已建立的分发。
它是基于已经由:
但包含了以下内容:
安装
sudo pip install bdist-venv2
示例
假设你想分发一个名为“我的项目”的项目。进入其setup.py:
cd ~/code/my-project/src
ls
...
setup.py
...
确保在virtualenv中没有not(不能从 在虚拟世界里)。如果你在一个出口,它:
deactivate
您可以创建一个“可重定位”的virtualenv ala bdist_venv:
python setup.py bdist_venv2 -f gztar
或将一个“修复”文件解压缩到特定位置:
python setup.py bdist_venv2 -l /usr/lib/my-package -f gztar
您将在dist中找到结果,该结果可能类似于:
ls dist ... dist/my-package-0.1.0.linux_x86_64-py2.7.tar.gz ...
取决于你的环境。
用法
python setup.py bdist_venv2 --help Common commands: (see '--help-commands'for more) setup.py build will build the package underneath 'build/' setup.py install will install the package Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message --no-user-cfg ignore pydistutils.cfg in your home directory Options for 'bdist_venv2' command: --bdist-dir (-b) temporary directory for creating the distribution --location-dir (-l) location where virtualenv will be installed to (default: relocatable) --extras (-e) list of extras to included in the virtualenv --plat-name (-p) platform name to embed in generated filenames (default: linux-x86_64) --keep-temp (-k) keep the installation tree around after creating the distribution --keep-compiled keep compiled files in the distribution --dist-name (-n) name of the built distribution --dist-dir (-d) directory to put final built distributions in --format (-f) archive format to create (tar, ztar, gztar, zip)(default: none) --owner (-u) Owner name used when creating a tar file (default: current user) --group (-g) Group name used when creating a tar file (default: current group) usage: setup.py [global_opts] cmd1 [cmd1_opts][cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
0.1.2(2014-01-05)
初次发布。