Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

pip fails to build psycopg from url

#204

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.

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

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Georges Racinet
    Georges Racinet

    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.

    April 3rd, 2014 @ 10:59 AM

  2. Daniele Varrazzo
    Daniele Varrazzo
    • 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 pip -e /path/to/psycopg2: psycopg/connection_type.c:810: error: ‘psyco_conn_g....

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

    April 4th, 2014 @ 05:10 PM

  3. Georges Racinet
    Georges Racinet

    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

    April 5th, 2014 @ 02:21 PM

  4. Daniele Varrazzo
    Daniele Varrazzo

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

    April 5th, 2014 @ 03:28 PM