Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1Lsa-0005Ur-0H for psycopg@arkaria.postgresql.org; Tue, 23 May 2023 06:52:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q1LsY-0006rf-Tm for psycopg@arkaria.postgresql.org; Tue, 23 May 2023 06:52:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q182p-00006Q-L2 for psycopg@lists.postgresql.org; Mon, 22 May 2023 16:05:59 +0000 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q182m-001Q0t-0h for psycopg@postgresql.org; Mon, 22 May 2023 16:05:58 +0000 Received: from mail-oa1-f71.google.com ([209.85.160.71]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.96) id 1q182k-005tEQ-01 for psycopg@postgresql.org; Mon, 22 May 2023 12:05:55 -0400 Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-1877e4dff8aso4390570fac.2 for ; Mon, 22 May 2023 09:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1684771554; x=1687363554; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=K/FbJ0e+20oqJ6s2GtxsfAdgkiiV++OeKmAT9PNXQEQ=; b=VspePw9Es1uO5Dr1ndvlwBYRi1BQDVgHg7BxuTcTojMusbpwHzlsc0JhQD63YfgIc0 jtnAJNjVZ4r5OGuit+bfuxWAu+MBoGpexI2Uq94wMhA30nhWE5Bo3C9hriv/9Xz031IL /vrXRDC6Eelc3jLW3wU5H+wkkeNcRnfPe++CI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684771554; x=1687363554; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=K/FbJ0e+20oqJ6s2GtxsfAdgkiiV++OeKmAT9PNXQEQ=; b=Nn7kOFBXwNmbIgDaCvU42sRwaDKWVBnBlJHX40lXsTyOvbjpDOfo5uMt3x4up6KRck qVABzvrMq6R3HFB4d7HdSyASPp7ibtl00fYk0Jz8D2FPLRUzxXRdZLmSUhEinClc4Ky6 TIwulkt318xeBBDRoXJdl5zUQ+3CqiupWY9b/xjOss3Jhhy2DUyLDNeiRdu5X4atG9Ny xGWpDsbiKpObgzJvXnZzo9Yz2W9O4556axSa92O2Ip1zIUOUUNRaRyGna9aokilOL8c1 yb2bELiA/Ccb+7fYBtGN1jtribWntsAIgKH0uNT+6SU2DCmmbcu6K+fP2ByeNigSUQ11 OHPA== X-Gm-Message-State: AC+VfDyPHVi+evPccIWYC8US2rXUrs4tLTNMrQmP/YOrwvIiacbJ/RkM +Fgxrlw5o8ZAf9BTEPw2soW0XqMPhZ3JPn/OtckPKoRonWkJ1+zGq31bloFUrzc0UAwThSE5DqJ B+QB0FUa7Pnk7B1wT0BctzR/sSO88uPX7YNhuRQ8= X-Received: by 2002:a05:6871:4901:b0:18f:170:ae14 with SMTP id tw1-20020a056871490100b0018f0170ae14mr4678621oab.34.1684771554392; Mon, 22 May 2023 09:05:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KfEdzhWPcpwv8GecqJCzIqhVCsGh1xM6dK/UE/Qbr3Ts2l4Zi+ZZ01rWDcYpjanpIEcCKIDjeJm7BqTxvRNw= X-Received: by 2002:a05:6871:4901:b0:18f:170:ae14 with SMTP id tw1-20020a056871490100b0018f0170ae14mr4678610oab.34.1684771553904; Mon, 22 May 2023 09:05:53 -0700 (PDT) MIME-Version: 1.0 From: Kerrick Staley Date: Mon, 22 May 2023 12:05:43 -0400 Message-ID: Subject: Does psycopg2-binary provide the psycopg2 package? To: psycopg@postgresql.org Content-Type: multipart/alternative; boundary="000000000000ffaa1805fc4a7184" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ffaa1805fc4a7184 Content-Type: text/plain; charset="UTF-8" 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 , 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 --000000000000ffaa1805fc4a7184 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If I install psycopg2-binary, and then I try to install a = package that depends on psycopg2, will pip "know" that psycopg2-b= inary satisfies=C2=A0the psycopg2 requirement and avoid installing psycopg2= ?

Empirically the answer seems to be "no". I i= nstalled psycopg2-binary, then ran `python3 -m pip install -e .` in a direc= tory with=C2=A0this setup.py file, and it tried to install psycopg= 2.

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

Thanks,
Kerrick
--000000000000ffaa1805fc4a7184--