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

Question about pkg_resources.compatible_platforms on macOS #3687

Open
dataflake opened this issue Nov 17, 2022 · 0 comments
Open

Question about pkg_resources.compatible_platforms on macOS #3687

dataflake opened this issue Nov 17, 2022 · 0 comments

Comments

@dataflake
Copy link

Please correct me if I am wrong, but it has been my understanding that the OS version string in a macOS binary egg name represents the lowest OS version supported. So for example, an egg named zope.proxy-4.6.1-py3.10-macosx-10.9-universal2.egg supports macOS 10.9 and higher.

With that in mind the code in pkg_resources.compatible_platforms feels wrong. In my particular situation the "provided" platform from the egg is macosx-10.9-universal2 and the "required" platform of the OS is macosx-13.0-universal2. compatible_platforms will reject anything that doesn't match exactly. Should it not accept "provided" when the "required" version number is equal to or larger and the platform part matches?

# are they the same major version and machine type?
if provMac.group(1) != reqMac.group(1) or \
provMac.group(3) != reqMac.group(3):
return False
# is the required OS major update >= the provided one?
if int(provMac.group(2)) > int(reqMac.group(2)):
return False

nehaljwani added a commit to regro-cf-autotick-bot/mysql-connector-python-feedstock that referenced this issue Jun 10, 2023
On macOS, the egg is generated for 10.9 and since the host machine is
probably 12.x, setuptools refuses to detect that as a valid egg and
proceeds to download and install.

xref: pypa/setuptools#3687
nehaljwani added a commit to nehaljwani/mysql-connector-python-feedstock that referenced this issue Jun 10, 2023
On macOS, the egg is generated for 10.9 and since the host machine is
probably 12.x, setuptools refuses to detect that as a valid egg and
proceeds to download and install.

xref: pypa/setuptools#3687
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

No branches or pull requests

1 participant