I've got a virtualenv set up for a django app. So far I've installed all my packages via pip when the virtualenv is activated, but I now need to clone one from bitbucket. Is there a special way to do this or do I just need to open a terminal, goto venv/lib/python2.7/site-packages and run the clone command?
我已经为django应用程序设置了一个virtualenv,到目前为止,当virtualenv被激活时,我已经通过pip安装了所有的包,但是现在我需要从bitbucket中克隆一个。是否有一种特殊的方法来实现这一点,或者我只需要打开一个终端,去venv/lib/python2.7/site-packages并运行克隆命令?
Here's the repository i'm trying to clone https://bitbucket.org/basti/python-amazon-product-api/src
这里是我正在尝试克隆的资源库https://bitbucket.org/basti/python-amazon-product-api/src
2 个解决方案
#1
1
Use the -e
flag and specify a git repo:
使用-e标志并指定git repo:
pip install -e git://github.com/manojlds/mylib.git#egg=mylib
The url above can be bitbucket, github etc.
上面的url可以是位桶、github等。
-e, --editable <VCS+REPOS_URL[@REV]#EGG=PACKAGE>
Install a package directly from a checkout. Source will be checked out into src/PACKAGE (lower-case) and installed in-place (using setup.py develop). You can run this on an existing directory/checkout (like pip install -e src/mycheckout). This option may be provided multiple times. Possible values for VCS are: svn, git, hg and bzr.-e, -可编辑的
直接从checkout安装一个软件包。源文件将被检入src/PACKAGE(小写)并安装到位(使用setup)。py开发)。您可以在一个现有的目录/签出(比如pip install -e src/mycheckout)上运行它。此选项可以提供多次。vc的可能值是:svn、git、hg和bzr。 +repos_url[@rev]#egg=package>
#2
0
clone repository,
克隆存储库,
-
if your app is has
setup.py
, then runpython setup.py install
when virtual env is actived.如果你的应用程序已经设置好了。然后运行python设置。当虚拟环境被激活时,py安装。
-
else copy this app inside you django project and add name of it your
INSTALLED_APPS
insettings.py
否则,在django项目中复制这个应用程序,并在settings.py中添加它的INSTALLED_APPS的名称
or you can use pip install -e <repo_addr>
, see doc.
或者您可以使用pip安装-e
#1
1
Use the -e
flag and specify a git repo:
使用-e标志并指定git repo:
pip install -e git://github.com/manojlds/mylib.git#egg=mylib
The url above can be bitbucket, github etc.
上面的url可以是位桶、github等。
-e, --editable <VCS+REPOS_URL[@REV]#EGG=PACKAGE>
Install a package directly from a checkout. Source will be checked out into src/PACKAGE (lower-case) and installed in-place (using setup.py develop). You can run this on an existing directory/checkout (like pip install -e src/mycheckout). This option may be provided multiple times. Possible values for VCS are: svn, git, hg and bzr.-e, -可编辑的
直接从checkout安装一个软件包。源文件将被检入src/PACKAGE(小写)并安装到位(使用setup)。py开发)。您可以在一个现有的目录/签出(比如pip install -e src/mycheckout)上运行它。此选项可以提供多次。vc的可能值是:svn、git、hg和bzr。 +repos_url[@rev]#egg=package>
#2
0
clone repository,
克隆存储库,
-
if your app is has
setup.py
, then runpython setup.py install
when virtual env is actived.如果你的应用程序已经设置好了。然后运行python设置。当虚拟环境被激活时,py安装。
-
else copy this app inside you django project and add name of it your
INSTALLED_APPS
insettings.py
否则,在django项目中复制这个应用程序,并在settings.py中添加它的INSTALLED_APPS的名称
or you can use pip install -e <repo_addr>
, see doc.
或者您可以使用pip安装-e