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

Python on macOS is built against 10.14 SDK #26

Closed
rdb opened this issue Sep 16, 2019 · 5 comments
Closed

Python on macOS is built against 10.14 SDK #26

rdb opened this issue Sep 16, 2019 · 5 comments
Labels
feature request New feature or request to improve the current logic

Comments

@rdb
Copy link

rdb commented Sep 16, 2019

It looks like the Python interpreters on macOS are compiled with macOS 10.14 as deployment target. They should rather be built against the oldest supported macOS SDK so that no errors are encountered when a program built against an older SDK is linked with the Python libraries. (Ideally we'd like to build against the 10.9 SDK, but unfortunately it is not supported; it will have to be 10.12, I suppose.)

@letmaik
Copy link

letmaik commented Sep 22, 2019

I can confirm that. A good reference of what viable deployment target versions should be can be seen from what's available from python.org: https://www.python.org/ftp/python/3.7.4/ There we have 10.6 and 10.9. Note for 3.5 there is only 10.5 and 10.6. It seems like the recommended approach is to use 10.6 for 3.5 and 10.9 for >3.5.
Due to this I'm currently forced to install Python manually in order to generate binary wheels that are widely compatible.
For reference, the deployment target can be influenced by setting the MACOSX_DEPLOYMENT_TARGET environment variable.

@letmaik
Copy link

letmaik commented Sep 22, 2019

Addition: I don't think SDK is strictly linked to deployment target. I was able to set MACOSX_DEPLOYMENT_TARGET=10.9 and together with the Python from python.org I could build 3.6 and 3.7 wheels which have the 10.9 platform tag. I'm not a macOS expert, so maybe someone else can make sense of that. Maybe a certain SDK supports multiple deployment targets (same and older up to some lower bound)?

FriendsOfGalaxy added a commit to FriendsOfGalaxy/galaxy-integrations-synchronizer that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/update-test-integration that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/galaxy-integration-bethesda that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/galaxy-integration-rockstar that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/galaxy-integration-gw2 that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy added a commit to FriendsOfGalaxy/galaxy-integrations-synchronizer that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/update-test-integration that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/galaxy-integration-bethesda that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/galaxy-integration-rockstar that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
FriendsOfGalaxy pushed a commit to FriendsOfGalaxy/galaxy-integration-gw2 that referenced this issue Oct 25, 2019
due to: actions/setup-python#26

It is rare case as most python packages do not require compilation from
sources. In case of any problems we will find alternative solution.
@coldfix
Copy link

coldfix commented Oct 7, 2020

Note that while the situation remains as is, a workaround for users is to replace actions/setup-python by setting up conda environments, e.g.:

      - uses: goanpeca/setup-miniconda@v1
        with:
          architecture: x64
          python-version: '3.8'
          # must be explicitly specified if architecture is not x64:
          miniconda-version: latest

      - run: |
          conda create -qyf py35 python=3.5 wheel -c anaconda
          conda activate py35
          python setup.py sdist bdist_wheel
        shell: bash -l {0}

      - run: |
          conda create -qyf py36 python=3.6 wheel -c anaconda
          conda activate py36
          python setup.py sdist bdist_wheel
        shell: bash -l {0}

      ...

which will result in the following deployment targets:

  • py2.7: 10.7
  • py3.5: 10.6
  • py3.6: 10.9
  • py3.7: 10.9
  • py3.8: 10.9

@dmitry-shibanov
Copy link
Contributor

Hello everyone. I'm going to close the feature request because we do not provide macOS with older versions and we're not planing to build python against of 10.9.

@dmitry-shibanov dmitry-shibanov closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2023
@rdb
Copy link
Author

rdb commented Jun 26, 2023

Why? This is a trivial change to make, and means setup-python will be useful to those who want to keep targeting 10.9.

The version of macOS (or the SDK) you provide is irrelevant to the deployment target you set when building Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

5 participants