Does psycopg2-binary provide the psycopg2 package?

From: Kerrick Staley <kstaley(at)janestreet(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Does psycopg2-binary provide the psycopg2 package?
Date: 2023-05-22 16:05:43
Message-ID: CACfSeTE=r0BkTB8S_1BDw8=5tharqoZAaeRLUNkYPsSu8jbw+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

If I install psycopg2-binary, and then I try to install a package that
depends on psycopg2, will pip "know" that psycopg2-binary satisfies the
psycopg2 requirement and avoid installing psycopg2?

Empirically the answer seems to be "no". I installed psycopg2-binary, then
ran `python3 -m pip install -e .` in a directory with this setup.py file
<https://gist.github.com/kerrick-js/b0962b74853cc297cf2186d251763262>, and
it tried to install psycopg2.

Is there a way that, in my setup.py file, I can depend on either psycopg2
or psycopg2-binary, whichever is available?

Thanks,
Kerrick

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2023-05-23 11:18:17 Re: Does psycopg2-binary provide the psycopg2 package?
Previous Message Scott Laird 2023-05-19 18:22:49 Connection Types with Logical Replication functions