开发者

What is the pip equivalent to easy_install/ez_setup's --install-dir and --script-dir?

开发者 https://www.devze.com 2023-02-25 02:21 出处:网络
We\'re using easy_install to install to a local build environment directory on windows. (This helps with having several checked out versio开发者_如何学Pythonns using different third-party packages s

We're using easy_install to install to a local build environment directory on windows.

(This helps with having several checked out versio开发者_如何学Pythonns using different third-party packages simultaneously, etc. Sort of like virtualenv but for C/C++/Java/.NET too. :)

By using --install-dir I can get the python packages into a path with .pth files (to which our PYTHONPATH points) and --script-dir to a dir included in PATH, so that everything is runnable from our command prompt.

So, today I use something like:

python ez_setup.py -d c:\_work\theproject\3rd\python -s c:\_work\theproject\3rd\bin\ sphinx=1.0.5

But, I'd like to use pip instead, simply because it has a local cache. (Helps with our build slaves too, which currently re-download these packages two-three times a day.)

However, I haven't been able to coax pip into doing the same thing as easy_install.

Any ideas?


--install-dir is possible to emulate using --install-purelib and --install-platlib:

Like this:

--install-option=--install-purelib=<installdir>
--install-option=--install-platlib=<installdir>

Note that specifying double-quotes (") around the install option as SteveMc did in the comment does not work when calling pip.exe using python.subprocess.call and when running on windows.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号