I just started using virtualenv to develop my Django applications and I really like it so far. One question that came up now is how I install programs, that are non-python, into my virtualenv.
I have for example a fabric script that lints all my code. In there I have a task which uses csslint for linting my css files. But csslint is a npm package. So how do I handle my virtualenv dependencies that are not a python package?
I've done this once (while ago), and it worked quite good. The trick is to install node.js and npm to virtualenv:
workon myenv
cd node-v0.4.8
./configure –prefix=“/path/to/myenv/”
make
make install
and then
workon myenv
git clone git://github.com/isaacs/npm.git
cd npm
make
make install
This exact commands above are outdated, but I think it should be possible to do something similar with modern node.js and npm.
您可以查看https://xstatic.readthedocs.org/或fanstatic,在Python包中包装静态库,然后可以在virtualenv中加载。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.