Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-hatchling for openSUSE:Factory checked in at 2023-01-09 17:23:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hatchling (Old) and /work/SRC/openSUSE:Factory/.python-hatchling.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hatchling" Mon Jan 9 17:23:21 2023 rev:13 rq:1056910 version:1.12.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hatchling/python-hatchling.changes 2023-01-04 17:50:40.561500239 +0100 +++ /work/SRC/openSUSE:Factory/.python-hatchling.new.32243/python-hatchling.changes 2023-01-09 17:23:23.427018522 +0100 @@ -1,0 +2,7 @@ +Sun Jan 8 17:46:56 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 1.12.2: + * Add macos-max-compat option to the wheel target that is enabled by default to + support the latest version 22.0 of the packaging library + +------------------------------------------------------------------- Old: ---- hatchling-1.12.1.tar.gz New: ---- hatchling-1.12.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hatchling.spec ++++++ --- /var/tmp/diff_new_pack.5Ni59s/_old 2023-01-09 17:23:24.135022529 +0100 +++ /var/tmp/diff_new_pack.5Ni59s/_new 2023-01-09 17:23:24.143022574 +0100 @@ -17,7 +17,7 @@ Name: python-hatchling -Version: 1.12.1 +Version: 1.12.2 Release: 0 Summary: Build backend used by Hatch License: MIT ++++++ hatchling-1.12.1.tar.gz -> hatchling-1.12.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.1/PKG-INFO new/hatchling-1.12.2/PKG-INFO --- old/hatchling-1.12.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.12.2/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hatchling -Version: 1.12.1 +Version: 1.12.2 Summary: Modern, extensible Python build backend Project-URL: Homepage, https://hatch.pypa.io/latest/ Project-URL: Sponsor, https://github.com/sponsors/ofek @@ -43,7 +43,7 @@ | | | | --- | --- | | Package | [](https://pypi.org/project/hatchling/) [](https://pypi.org/project/hatchling/) [](https://pypi.org/project/hatchling/) | -| Meta | [](https://github.com/pypa/hatch) [](https://github.com/psf/black) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/ofek) | +| Meta | [](https://github.com/pypa/hatch) [](https://github.com/charliermarsh/ruff) [](https://github.com/psf/black) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/ofek) | </div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.1/README.md new/hatchling-1.12.2/README.md --- old/hatchling-1.12.1/README.md 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.12.2/README.md 2020-02-02 01:00:00.000000000 +0100 @@ -7,7 +7,7 @@ | | | | --- | --- | | Package | [](https://pypi.org/project/hatchling/) [](https://pypi.org/project/hatchling/) [](https://pypi.org/project/hatchling/) | -| Meta | [](https://github.com/pypa/hatch) [](https://github.com/psf/black) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/ofek) | +| Meta | [](https://github.com/pypa/hatch) [](https://github.com/charliermarsh/ruff) [](https://github.com/psf/black) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/ofek) | </div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.1/src/hatchling/__about__.py new/hatchling-1.12.2/src/hatchling/__about__.py --- old/hatchling-1.12.1/src/hatchling/__about__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.12.2/src/hatchling/__about__.py 2020-02-02 01:00:00.000000000 +0100 @@ -1 +1 @@ -__version__ = '1.12.1' +__version__ = '1.12.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatchling-1.12.1/src/hatchling/builders/wheel.py new/hatchling-1.12.2/src/hatchling/builders/wheel.py --- old/hatchling-1.12.1/src/hatchling/builders/wheel.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatchling-1.12.2/src/hatchling/builders/wheel.py 2020-02-02 01:00:00.000000000 +0100 @@ -167,6 +167,7 @@ self.__shared_data: dict[str, str] | None = None self.__extra_metadata: dict[str, str] | None = None self.__strict_naming: bool | None = None + self.__macos_max_compat: bool | None = None def set_default_file_selection(self) -> None: if self.__include or self.__exclude or self.__packages or self.__only_include: @@ -325,6 +326,18 @@ return self.__strict_naming + @property + def macos_max_compat(self) -> bool: + if self.__macos_max_compat is None: + macos_max_compat = self.target_config.get('macos-max-compat', True) + if not isinstance(macos_max_compat, bool): + message = f'Field `tool.hatch.build.targets.{self.plugin_name}.macos-max-compat` must be a boolean' + raise TypeError(message) + + self.__macos_max_compat = macos_max_compat + + return self.__macos_max_compat + class WheelBuilder(BuilderInterface): """ @@ -602,16 +615,27 @@ tag_parts = [tag.interpreter, tag.abi, tag.platform] archflags = os.environ.get('ARCHFLAGS', '') - if sys.platform == 'darwin' and archflags and sys.version_info[:2] >= (3, 8): - import platform - import re + if sys.platform == 'darwin': + if archflags and sys.version_info[:2] >= (3, 8): + import platform + import re + + archs = re.findall(r'-arch (\S+)', archflags) + if archs: + plat = tag_parts[2] + current_arch = platform.mac_ver()[2] + new_arch = 'universal2' if set(archs) == {'x86_64', 'arm64'} else archs[0] + tag_parts[2] = f'{plat[:plat.rfind(current_arch)]}{new_arch}' + + if self.config.macos_max_compat: + import re - archs = re.findall(r'-arch (\S+)', archflags) - if archs: plat = tag_parts[2] - current_arch = platform.mac_ver()[2] - new_arch = 'universal2' if set(archs) == {'x86_64', 'arm64'} else archs[0] - tag_parts[2] = f'{plat[:plat.rfind(current_arch)]}{new_arch}' + sdk_match = re.search(r'macosx_(\d+_\d+)', plat) + if sdk_match: + sdk_version_part = sdk_match.group(1) + if tuple(map(int, sdk_version_part.split('_'))) >= (11, 0): + tag_parts[2] = plat.replace(sdk_version_part, '10_16', 1) return '-'.join(tag_parts)