创建从 git 存储库安装的 Python .egg
我目前正在研究我们的 Python 产品的部署技术。我们已经使用多个 git 存储库管理代码,但希望改进设置和更新服务器的过程。看来 easy_install、.egg 文件和 virtualenv 是当今执行此操作的最佳工具。
问题是:我们并不真正进行版本控制;我们只是进行版本控制。我们所有的产品都有一个主分支,它应该始终提供稳定的代码。如果我们想更新,我们必须在每台服务器上为每个产品及其所有依赖项git pull
主分支。
这个解决方案非常耗时,我们希望对其进行改进。
我的想法是在所有服务器/安装上创建一个 virtualenv 实例,并使用 easy_install 来安装和更新我们自己的软件包,但我找不到指定 git 存储库作为源代码源的方法。
有办法实现吗?我错过了什么吗?我是否走错了方向,总体来说这是一个坏主意?
提前致谢, 法比安
I'm currently researching deployment techniques for our Python products. We manage our code with multiple git repositories already but want to improve the process of setting up and updating our servers. It seems that easy_install, .egg files and virtualenv are the best tools for doing this nowadays.
Here's the catch: We don't really do versioning; all our products have a master branch which is supposed to provide stable code all the time. If we want to update, we have to git pull
the master branch on every server, for each product and all its dependencies.
This solution is very time-consuming and we want to improve it.
My idea was to create a virtualenv instance on all servers/installations and use easy_install to install and update our own packages, but I couldn't find a way to specify a git repository as a source for the source code.
Is there a way to achieve that? Did I miss something? Am I going in the wrong direction and this is a bad idea overall?
Thanks in advance,
Fabian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
pip
代替easy_install,它支持多种可能的方式来指定从哪里获取包,其中之一是git
,然后您可以像这样安装您的包:You can use
pip
instead of easy_install, it supports a number of possible ways to specify where to get the package from, one beinggit
, you could then install your package like this: