开发者

Python, virtualenv - Is it possible to use a single Pyramid project with multiple virtualenvs on different computers?

开发者 https://www.devze.com 2023-02-13 02:57 出处:网络
I\'m really interested in trying out the Pyramid Framework but only half 开发者_如何学Pythonof my programming time is spent on my computer here at home; I spend a considerable amount of time at school

I'm really interested in trying out the Pyramid Framework but only half 开发者_如何学Pythonof my programming time is spent on my computer here at home; I spend a considerable amount of time at school and use their computers as well, and according to the documentation for virtualenv, environments can't be moved around like projects. What I'm thinking of doing is installing a different virtualenv for Pyramid projects on the computers I use at school in addition to one at home. Would I be able to do this?


In your setup.py file at the root of your project, you just have to list all the dependencies you have in requires.

Then, with your virtualenv activated, you run

python setup.py develop

This will install missing dependencies on your current virtualenv.

Example:

requires = ['pyramid',
            'WebError',
            'pymongo',
            'mock',
            'formencode']


  1. Use something like Dropbox to keep your source file in sync between machines.
  2. Use pip in with virtualenv, keep a requirements.txt file that lists all the dependencies for your software.


this isn't really specific to pyramid. you need to look into version control. get a free account on github or bitbucket and push/pull your code from there.

0

精彩评论

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