简体   繁体   中英

Installing a package from private pypi in zc.buildout

I'm trying to install a python package from the private reportlab pypi server using zc.buildout.

When I install using the instructions provided on their own site, then it installs without problem. http://www.reportlab.com/reportlabplus/installation/

If however I install using zc.buildout, I keep getting Couldn't find distributions for 'rlextra' . I added their pypi repo to find-links , so I'm not sure what I'm missing.

My buildout config:

[buildout]
versions = versions
include-site-packages = false
extensions = mr.developer
unzip = true

find-links = https://[user]:[pass]@www.reportlab.com/pypi

parts =
    python
    django
    compass-config

auto-checkout = *

eggs =
    ...
    rlextra
    ...

... etc.

Edit : I should point out that I did in the end do a manual download of the package, and using it in my buildout as a develop package. Even though this solves the immediate issue, I would still like to know why my original setup is not working.

You are passing in the PyPI main link for the find-links URL, but find-links only works with the simple index style pages (which exist per package on PyPI).

For example, the beautifulsoup4 package has a simple index page at https://pypi.python.org/simple/beautifulsoup4/ .

The ReportLab server also has simple pages; add the one for this package to your buildout:

find-links = https://[user]:[pass]@www.reportlab.com/pypi/simple/rlextra/

IIRC you can also add the top-level https://[user]:[pass]@www.reportlab.com/pypi/simple URL as a find-links, but being more specific saves on the URL round-trips.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM