7

Tell me if what I'm trying to do doesn't make sense.

I want to create a virtual environment that, among other things, includes MySQLDb 1.2.3. This library is distributed as a gzipped tarball (.tgz) file. I want to install everything—including tarballs on my local filesystem—from a requirements file in requirements/apps.txt (this is based on a setup I saw in http://thraxil.org/users/anders/posts/2009/06/12/Django-Deployment-with-virtualenv-and-pip/):

pip.py install -E ve --enable-site-packages --requirement requirements/apps.txt

I couldn't find any documentation on the pip requirements file format for local files.

What does the requirements file (apps.txt) need to contain if the directory requirements/ contains the file MySQL-python-1.2.3.tgz?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Nate Reed
  • 6,761
  • 12
  • 53
  • 67

2 Answers2

7

You can use absolute/relative paths in requirements files e.g.:

--extra-index-url=http://example.com
my-apps/apps1.tar.gz
# put apps2-1.0.1.tar.gz to http://example.com/apps2/
apps2
jfs
  • 399,953
  • 195
  • 994
  • 1,670
2

You have to add -f file:/absolute/path/to/the/directory/that/contains/your/downloaded/tarball/ to your call to pip.

The requirements file has to contain:

MySQL-python==1.2.3

plus everything else you want to install

Sebastian Blask
  • 2,870
  • 1
  • 16
  • 29