This project is archived and is in readonly mode.

#204 ✓resolved
Daniele Varrazzo

pip fails to build psycopg from url

Reported by Daniele Varrazzo | April 3rd, 2014 @ 10:30 AM

Psycopg is affected by this bug (pip? setuptools? don't know)

https://github.com/pypa/pip/issues/1630

which makes impossible to build from url:

mkvirtualenv testpip
pip install -U pip setuptools virtualenv
pip install --verbose -e git+https://github.com/psycopg/psycopg2.git#egg=psycopg2

the bug is caused by the setup.cfg not being parsed when installing from url.

We may work around that by checking if the setup.cfg has not been imported at all, in which case we may apply the defaults, with the rationale that if sb. is installing from url he has not changed the .cfg. Of course changes in the .cfg defaults should be reflected in the setup.py as well: we need comments in both the files to clarify that.

Comments and changes to this ticket

  • Georges Racinet

    Georges Racinet April 3rd, 2014 @ 10:59 AM

    This bug also occurs under zc.buildout, with the 'develop' directive on a local clone made before hand, which

    • seems to indicate that it'd be in setuptools indeed (pip not at all involved, but maybe both tools make the same error in the setup invocation)
    • does not fit the rationale

    It also occurs if using the gp.vcsdevelop extension, beacuse that uses pip for the download part and zc.buildout's develop() for the actual installation.
    I have not tried with mr.developer, but I expect it to behave similarly.

  • Daniele Varrazzo

    Daniele Varrazzo April 4th, 2014 @ 05:10 PM

    • State changed from “new” to “resolved”

    Bug fixed: now checking out from master and maint_2_5 works as expected.

    This bug can be considered a duplicate of #18.

    Georges, can you test it with zc.buildout? Thank you :)

  • Georges Racinet

    Georges Racinet April 5th, 2014 @ 02:21 PM

    Hi Daniele, my pleasure to test it.

    The compilation passed (did not get that error again), but it does not work right away with zc.buildout, the reason being that
    buildout will expect the clone to be the suitable item to insert into sys.path, which is not the way it works with psycopg2.

    This is apparently unrelated to what you fixed. I'll have to dig a bit into buildout's way of doing for "developping" pure distutils distributions, and into psycopg2's developper documentation to see what kind of workaround and/or fix I can propose, and to whom.

    Regards

  • Daniele Varrazzo

    Daniele Varrazzo April 5th, 2014 @ 03:28 PM

    Thank you for testing. I don't know what zc.buildout expects but at least we have worked around the setuptools issue.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
<br/>
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins