Closed Flamefire closed 12 months ago
Hello,
Unfortunately the case of two distribution packages (psycopg2
, psycopg2-binary
) providing the same Python package (psycopg2
) is not handled well by Python distribution metadata.
The problem has been resolved in psycopg 3. See docs about installing the binary package and handling dependencies.
The documentation for psycopg 2 is adequate: the pipestat devs might have read it and decided that it didn't apply to them, or might have not read it, in which case better docs wouldn't have helped.
My suggestion for them is to migrate to psycopg 3. Even if the problems that affected the first versions of the binary package are probably resolved, we are not considering re-adding the binary wheels to psycopg2.
The change to add another, differently named, package for binary distribution causes problems for Python packages depending on
psycopg2
: What are they supposed to put into their requirements? (i.e. insetup.py
)?As per the documentation:
According to this it should be
psycopg2
, but now for users runningpip install foo
it will try to download and build the source package which potentially fails to install due to unmet build requirements. They can manually runpip install psycopg2-binary
but PIP would still resolve to download and buildpsycopg2
when they install the dependent packagefoo
.Is there a solution to this issue that either package suffices a potential requirement as resolved by pip? Or would you consider readding the binary wheels to
psycopg2
?In any case can this be better documented for maintainers of dependent packages please?
See https://github.com/pepkit/pipestat/issues/106 for an example.