-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00adf41
commit 55f9355
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
`virtualenv` - Python virtual environments | ||
========================================== | ||
|
||
Synopsis:: | ||
|
||
fpm -s virtualenv [other options] EGG_SPEC|requirements.txt | ||
|
||
FPM has support for building packages that provide a python virtualenv from a | ||
single egg or from a `requirements.txt` file. This lets you bundle up a set of | ||
python dependencies separate from system python that you can then distribute. | ||
|
||
.. note:: | ||
`virtualenv` support requires that you have `virtualenv` and the | ||
`virtualenv-tools` binary on your path. This can usually be achieved with | ||
`pip install virtualenv virtualenv-tools`. | ||
|
||
Example uses: | ||
============= | ||
|
||
Build an rpm package for ansible:: | ||
|
||
fpm -s virtualenv -t deb ansible | ||
yum install virtualenv-ansible*.rpm | ||
which ansible # /usr/share/python/ansible/bin/ansible | ||
|
||
Create a debian package for your project's python dependencies under `/opt`:: | ||
|
||
echo 'glade' >> requirements.txt | ||
echo 'paramiko' >> requirements.txt | ||
echo 'SQLAlchemy' >> requirements.txt | ||
fpm -s virtualenv -t deb --name myapp-python-libs \ | ||
--virtualenv-install-location /opt/myapp \ | ||
requirements.txt | ||
|
||
Create a debian package from a version 0.9 of an egg kept in your internal | ||
pypi repository, along with it's external dependencies:: | ||
|
||
fpm -s virtualenv -t deb \ | ||
--virtualenv-pypi-extra-url=https://office-pypi.lan/ \ | ||
proprietary-magic=0.9 |