Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High macOS deployment targets for psycopg2-binary #1753

Closed
2 of 3 tasks
bwoodsend opened this issue Nov 19, 2024 · 1 comment · May be fixed by #1755
Closed
2 of 3 tasks

High macOS deployment targets for psycopg2-binary #1753

bwoodsend opened this issue Nov 19, 2024 · 1 comment · May be fixed by #1755

Comments

@bwoodsend
Copy link

This is a bug tracker
If you have a question, such has "how do you do X with Python/PostgreSQL/psycopg2" please write to the mailing list or open a question instead.

Before opening this ticket, please confirm that:

Please complete the following information:

  • OS: macOS 13 arm64
  • Psycopg version: 2.9.10
  • Python version: 3.12.7
  • PostgreSQL version:
  • pip version: 24.3.1

The MACOSX_DEPLOYMENT_TARGET sets the minimum version of macOS that the psycopg2-binary wheels will install on so the introduction of setting MACOSX_DEPLOYMENT_TARGET to the CI runner version blocks installs on anything older than the CI runner. As of 2.9.10, pip install psycopg2-binary on a macOS <14.0 arm64 or <12.0 x86_64 machine will ignore the wheels, pull the sdist, probably fail to build from source and give the misleading advice to try pip install psycopg2-binary instead.

Judging by the lack of drop support for macOS 13 entries in the changelog and macOS 13 still having another year before its EOL date, I'm guessing that wasn't intentional?

Incidentally, why publish sdists for the psycopg2-binary package?

@dvarrazzo
Copy link
Member

Hello,

The variable was added because latest cibuildwheel versions require it. If omitted, build fails. I haven't found a simple workaround. See also discussion at pypa/cibuildwheel#1926

We don't declare support for specific OS, we only declare support for specific Python versions. Binary packages are produced on a best-effort basis.

The presence of the source in the binary package was for a fallback for people adding psycopg2-binary in the requirements.txt and making impossible to install dependencies on platforms not supporting binary. Psycopg 3 uses a different and better strategy.

As my competence with macOS is limited and I had made my attempts at the time of releasing the latest version, I will close this ticket here. If you think you can provide a solution to the problem, a MR is welcome.

bwoodsend added a commit to bwoodsend/psycopg2 that referenced this issue Nov 23, 2024
Homebrew binaries are always compiled for exactly the version they're
installed on making them very un-portable. When a wheel is "repaired" by
cibuildwheel, delocate-wheel pulls in _psycopg's dependencies
(libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub
Actions macOS 14 runner, are provided by Homebrew and are therefore only
macOS >= 14 compatible. The resultant wheel is therefore incompatible
with all but the latest macOS versions.

Build all dependencies from source so that we can set the deployment
target to something sensible. Fixes psycopg#1753.
bwoodsend added a commit to bwoodsend/psycopg2 that referenced this issue Nov 23, 2024
Homebrew binaries are always compiled for exactly the version they're
installed on making them very un-portable. When a wheel is "repaired" by
cibuildwheel, delocate-wheel pulls in _psycopg's dependencies
(libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub
Actions macOS 14 runner, are provided by Homebrew and are therefore only
macOS >= 14 compatible. The resultant wheel is therefore incompatible
with all but the latest macOS versions.

Build all dependencies from source so that we can set the deployment
target to something sensible. Fixes psycopg#1753.
bwoodsend added a commit to bwoodsend/psycopg2 that referenced this issue Nov 24, 2024
Homebrew binaries are always compiled for exactly the version they're
installed on making them very un-portable. When a wheel is "repaired" by
cibuildwheel, delocate-wheel pulls in _psycopg's dependencies
(libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub
Actions macOS 14 runner, are provided by Homebrew and are therefore only
macOS >= 14 compatible. The resultant wheel is therefore incompatible
with all but the latest macOS versions.

Build all dependencies from source so that we can set the deployment
target to something sensible. Fixes psycopg#1753.
bwoodsend added a commit to bwoodsend/psycopg2 that referenced this issue Nov 24, 2024
Homebrew binaries are always compiled for exactly the version they're
installed on making them very un-portable. When a wheel is "repaired" by
cibuildwheel, delocate-wheel pulls in _psycopg's dependencies
(libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub
Actions macOS 14 runner, are provided by Homebrew and are therefore only
macOS >= 14 compatible. The resultant wheel is therefore incompatible
with all but the latest macOS versions.

Build all dependencies from source so that we can set the deployment
target to something sensible. Fixes psycopg#1753.
bwoodsend added a commit to bwoodsend/psycopg2 that referenced this issue Nov 24, 2024
Homebrew binaries are always compiled for exactly the version they're
installed on making them very un-portable. When a wheel is "repaired" by
cibuildwheel, delocate-wheel pulls in _psycopg's dependencies
(libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub
Actions macOS 14 runner, are provided by Homebrew and are therefore only
macOS >= 14 compatible. The resultant wheel is therefore incompatible
with all but the latest macOS versions.

Build all dependencies from source so that we can set the deployment
target to something sensible. Fixes psycopg#1753.
bwoodsend added a commit to bwoodsend/psycopg2 that referenced this issue Dec 12, 2024
Homebrew binaries are always compiled for exactly the version they're
installed on making them very un-portable. When a wheel is "repaired" by
cibuildwheel, delocate-wheel pulls in _psycopg's dependencies
(libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub
Actions macOS 14 runner, are provided by Homebrew and are therefore only
macOS >= 14 compatible. The resultant wheel is therefore incompatible
with all but the latest macOS versions.

Build all dependencies from source so that we can set the deployment
target to something sensible. Fixes psycopg#1753.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants