This project is archived and is in readonly mode.
setup.py egg_info fails if development libraries are missing
Reported by akaihola | September 19th, 2012 @ 06:20 PM
I have a server where outbound HTTP traffic is intentionally prohibited. When deploying my web app, I'm downloading Python package dependencies on another host and rsyncing them up to the server.
If the PostgreSQL development libraries aren't present on the
host, pip throws an exception when executing setup.py
egg_info
for psycopg2 and fails to download any remaining
packages. The --no-deps
option has no effect on this
behavior.
Downloading packages on a different machine is probably a common
use case for pip's --download
. It would make sense for
it to work even if development packages aren't installed on the
dowloading machine.
As an example, let's assume a requirements.txt:
psycopg2
python-dateutil
If I now run:
$ pip install --download . -r requirements.txt
I get this:
Downloading/unpacking psycopg2 (from -r requirements.txt (line 1))
Saved ./psycopg2-2.4.5.tar.gz
Running setup.py egg_info for package psycopg2
Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in build/psycopg2
Storing complete log in /home/akaihola/.pip/pip.log
In this case, the psycopg2 package is downloaded, but python-dateutils is not:
$ ls
psycopg2-2.4.5.tar.gz requirements.txt
See https://github.com/pypa/pip/issues/661 for a discussion of this issue on the pip issue tracker.
Comments and changes to this ticket
-
Daniele Varrazzo September 19th, 2012 @ 10:37 PM
We don't support directly pip and have no idea of the manifest, metadata or whatever dependency tracker uses. Feel free to provide a patch to fix your problem.
-
Daniele Varrazzo October 10th, 2012 @ 12:01 PM
- State changed from new to invalid
Closing the ticket: this is not our bug. Psycopg doesn't depend on setuptools, it depends on distutils. pip and easy_install work just fine on psycopg as long as external dependencies are available as explained in the docs (http://initd.org/psycopg/docs/install.html#install-from-source) and that's enough for us.
Feel free to provide patches if this improves what you think is broken, but adding a dependency on setuptools will not be accepted.
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.