使用 git 时,pinax 中的代码和环境分离
我有一个用 django 和 pinax 编写的有点大的项目。目前,我将整个 virtualenv 和我的源代码树保存在同一个 git 存储库中;然而,这变得非常笨拙,我希望将环境与源代码分开,因为坦率地说,它变得非常难以管理。我只发现 Git 和客户端/服务器代码分离 不适用对我来说,因为我的问题是将环境与源头分开。是否有一种特定的方法(目录布局)与 virtualenv 一起使用,可以保持环境独立?例如
./env
./src
,当前 virtualenv 的默认设置是当前
./env
./env/project/
我使用第二种布局,并将所有 env 和源放在单个 git 存储库中,这就是我需要更改的内容。
第一个布局的问题是路径不起作用并且模块引发 ImportError。这看起来像是一个外观问题,但对我来说非常烦人。使用 git 时将 virtualenv 与源代码分离的过程是什么?
I have a somewhat large project written in django and pinax. Currently I keep then entire virtualenv and my source tree in the same git repository; however, this is becoming very unwieldy I would like to keep the environment separate from the source code as frankly it is becoming very hard to manage. I have only found Git and client/server code separation which doesn't apply to me, since my question is about separating the environment from the source. Is there a specific way, directory layout, to use with virtualenv that can keep the environment separate? For example
./env
./src
Currently the default for virtualenv is to have
./env
./env/project/
Currently I use the second layout, and have all the env and source in a single git repository, this is what I need to change.
The problem with the first layout is that path's don't work and modules raise ImportError. This might seem like a cosmetic issue, but is very annoying to me. What is the procedure for separating virtualenv from the source code while using git.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论