Delivery package

I have one Python A package that depends on another private package called godot (hosted on bitbucket and must be accessible via git + ssh). In package A setup.py, I have the following code:

... install_requires=['godot'], dependency_links=['git+ssh:// git@bitbucket.org /xxx/godot.git#egg=godot'] ... 

I have two questions:

  • Now setuptools 1.4 (the latest stable version) does not support the 'git + ssh' protocol, only the code in the development branch processes this protocol: Python setuptools: How can I list the private repository in the install_requires file? . I installed the development version via:

    pip install --upgrade --force-reinstall hg+https://bitbucket.org/pypa/setuptools#egg=setuptools

    I almost solved this bit, but I wonder if any other approach is available? Invoke pip install -r requirements.txt (is there git + ssh: // git @ bitbucket.org / xxx / godot.git # egg = godot list in requirements.txt)?

  • The second question is the conflict of names. There is another pypi package, also called godot. Therefore, when I install package A using the following command, pip installs godot from the pypi index:

    pip install git+ssh:// git@pypi.corp.com /xxx/A.git#egg=A

    How to get pip (setup.py) to install a private godot package, not an index on a pypi index?

+6
source share
1 answer

For part 1: you can install packages through pip, specifying how:

 $ pip install http://my.package.repo/SomePackage-1.0.4.zip 

To make everything simple and not waste extra time on it, I just downloaded the source .zip file and installed it via pip, as described above.

Look here ...

For part 2: pip has a --no-dependencies switch. Add that after installing all the dependencies manually

0
source

Source: https://habr.com/ru/post/958440/


All Articles