From 244b96836e658761b0315a735041385e5b7618593619ef95b5abb59b1d8b7d8a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 5 May 2023 10:47:00 +0000 Subject: [PATCH 1/2] - update to 1.7.0: * The `src-layout` project template option is now enabled by default * Non-critical output now goes to stderr * Add `tool.hatch.env.requires` configuration to automatically install dependencies for environment and environment collector plugins * Add `custom` environment collector * Improve syncing of dependencies provided through Git direct references * Add `isolated_data_directory` attribute to the environment interface * Increase the timeout for and add retries to the `index` publisher * Expand home and environment variables in configured cache and data directories * Improve readability of exceptions * Update project templates * Bump the minimum supported version of Hatchling to 1.14.0 * Fix displaying the version with the `version` command when the version is static and build dependencies are unmet * Fix build environments for the `virtual` environment type when storing within a relative path * Allow setuptools metadata migration for projects without `setup.py` if `setup.cfg` is present * Handle additional edge cases for setuptools metadata migration * Support boolean values for the `config set` command - drop hatch-pr659-utf8.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch?expand=0&rev=16 --- hatch-pr659-utf8.patch | 43 ------------------------------------------ hatch-v1.6.3.tar.gz | 3 --- hatch-v1.7.0.tar.gz | 3 +++ python-hatch.changes | 33 ++++++++++++++++++++++++++++++++ python-hatch.spec | 6 ++---- 5 files changed, 38 insertions(+), 50 deletions(-) delete mode 100644 hatch-pr659-utf8.patch delete mode 100644 hatch-v1.6.3.tar.gz create mode 100644 hatch-v1.7.0.tar.gz diff --git a/hatch-pr659-utf8.patch b/hatch-pr659-utf8.patch deleted file mode 100644 index 9f8b9aa..0000000 --- a/hatch-pr659-utf8.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c42f1d7086e4a8d1a7e1f299c50db2f1a16a2e3d Mon Sep 17 00:00:00 2001 -From: Ofek Lev -Date: Sat, 10 Dec 2022 11:49:48 -0500 -Subject: [PATCH] Remove unnecessary encoding declaration - ---- - backend/src/hatchling/version/core.py | 1 - - docs/history/hatchling.md | 4 ++++ - tests/backend/builders/hooks/test_version.py | 2 -- - 3 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/backend/src/hatchling/version/core.py b/backend/src/hatchling/version/core.py -index 38c26aca7..cad01f94b 100644 ---- a/backend/src/hatchling/version/core.py -+++ b/backend/src/hatchling/version/core.py -@@ -5,7 +5,6 @@ - - DEFAULT_PATTERN = r'(?i)^(__version__|VERSION) *= *([\'"])v?(?P.+?)\2' - DEFAULT_TEMPLATE = """\ --# -*- coding: utf-8 -*- - # This file is auto-generated by Hatchling. As such, do not: - # - modify - # - track in version control e.g. be sure to add to .gitignore -diff --git a/tests/backend/builders/hooks/test_version.py b/tests/backend/builders/hooks/test_version.py -index 3b916d3ed..b03500292 100644 ---- a/tests/backend/builders/hooks/test_version.py -+++ b/tests/backend/builders/hooks/test_version.py -@@ -91,7 +91,6 @@ def update(self, metadata): - assert expected_file.is_file() - assert expected_file.read_text() == helpers.dedent( - """ -- # -*- coding: utf-8 -*- - # This file is auto-generated by Hatchling. As such, do not: - # - modify - # - track in version control e.g. be sure to add to .gitignore -@@ -132,7 +131,6 @@ def update(self, metadata): - assert expected_file.is_file() - assert expected_file.read_text() == helpers.dedent( - """ -- # -*- coding: utf-8 -*- - # This file is auto-generated by Hatchling. As such, do not: - # - modify - # - track in version control e.g. be sure to add to .gitignore diff --git a/hatch-v1.6.3.tar.gz b/hatch-v1.6.3.tar.gz deleted file mode 100644 index bc4eeec..0000000 --- a/hatch-v1.6.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de6d4bb1b6453de289551fac54e3d114eaeed369dc8f1b8a3493849c3581b423 -size 367984 diff --git a/hatch-v1.7.0.tar.gz b/hatch-v1.7.0.tar.gz new file mode 100644 index 0000000..caa4c1c --- /dev/null +++ b/hatch-v1.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a71d96fc008e7c6f6ba01324a0362cb2098f04b515a0dc47644ec22ea431a71 +size 378183 diff --git a/python-hatch.changes b/python-hatch.changes index 24791e6..0f532e9 100644 --- a/python-hatch.changes +++ b/python-hatch.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Fri May 5 10:45:53 UTC 2023 - Dirk Müller + +- update to 1.7.0: + * The `src-layout` project template option is now enabled by + default + * Non-critical output now goes to stderr + * Add `tool.hatch.env.requires` configuration to automatically + install dependencies for environment and environment + collector plugins + * Add `custom` environment collector + * Improve syncing of dependencies provided through Git direct + references + * Add `isolated_data_directory` attribute to the environment + interface + * Increase the timeout for and add retries to the `index` + publisher + * Expand home and environment variables in configured cache and + data directories + * Improve readability of exceptions + * Update project templates + * Bump the minimum supported version of Hatchling to 1.14.0 + * Fix displaying the version with the `version` command when + the version is static and build dependencies are unmet + * Fix build environments for the `virtual` environment type + when storing within a relative path + * Allow setuptools metadata migration for projects without + `setup.py` if `setup.cfg` is present + * Handle additional edge cases for setuptools metadata + migration + * Support boolean values for the `config set` command +- drop hatch-pr659-utf8.patch (upstream) + ------------------------------------------------------------------- Fri Jan 6 16:17:06 UTC 2023 - Ben Greiner diff --git a/python-hatch.spec b/python-hatch.spec index af7a6fc..575ddce 100644 --- a/python-hatch.spec +++ b/python-hatch.spec @@ -26,17 +26,15 @@ %endif Name: python-hatch%{psuffix} -Version: 1.6.3 +Version: 1.7.0 Release: 0 Summary: Modern, extensible Python project management License: MIT URL: https://hatch.pypa.io/latest/ # SourceRepository: https://github.com/pypa/hatch Source: https://github.com/pypa/hatch/archive/refs/tags/hatch-v%{version}.tar.gz -# PATCH-FIX-UPSTREAM hatch-pr659-utf8.patch gh#pypa/hatch#659 required due to newer hatchling -Patch1: hatch-pr659-utf8.patch BuildRequires: %{python_module base >= 3.7} -BuildRequires: %{python_module hatchling >= 1.11.0} +BuildRequires: %{python_module hatchling >= 1.14} BuildRequires: %{python_module pip} BuildRequires: fdupes BuildRequires: python-rpm-macros From d318249e4b138e6602d32131761fce250da43b8ef97c34fcd1849fd10b5e0510 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 10 May 2023 16:08:00 +0000 Subject: [PATCH 2/2] - Add fix-sdist-target.patch to fix tests: gh#pypa/hatch@1b10663e645e OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch?expand=0&rev=17 --- fix-sdist-target.patch | 40 ++++++++++++++++++++++++++++++++++++++++ python-hatch.changes | 5 +++++ python-hatch.spec | 2 ++ 3 files changed, 47 insertions(+) create mode 100644 fix-sdist-target.patch diff --git a/fix-sdist-target.patch b/fix-sdist-target.patch new file mode 100644 index 0000000..47bee7e --- /dev/null +++ b/fix-sdist-target.patch @@ -0,0 +1,40 @@ +Index: hatch-hatch-v1.7.0/backend/src/hatchling/builders/sdist.py +=================================================================== +--- hatch-hatch-v1.7.0.orig/backend/src/hatchling/builders/sdist.py ++++ hatch-hatch-v1.7.0/backend/src/hatchling/builders/sdist.py +@@ -161,7 +161,7 @@ class SdistBuilder(BuilderInterface): + def build_standard(self, directory: str, **build_data: Any) -> str: + found_packages = set() + +- with SdistArchive(self.project_id, reproducible=self.config.reproducible) as archive: ++ with SdistArchive(self.artifact_project_id, reproducible=self.config.reproducible) as archive: + for included_file in self.recurse_included_files(): + if self.config.support_legacy: + possible_package, file_name = os.path.split(included_file.relative_path) +@@ -170,7 +170,9 @@ class SdistBuilder(BuilderInterface): + + tar_info = archive.gettarinfo( + included_file.path, +- arcname=normalize_archive_path(os.path.join(self.project_id, included_file.distribution_path)), ++ arcname=normalize_archive_path( ++ os.path.join(self.artifact_project_id, included_file.distribution_path) ++ ), + ) + + if tar_info.isfile(): +Index: hatch-hatch-v1.7.0/tests/backend/builders/test_sdist.py +=================================================================== +--- hatch-hatch-v1.7.0.orig/tests/backend/builders/test_sdist.py ++++ hatch-hatch-v1.7.0/tests/backend/builders/test_sdist.py +@@ -1516,9 +1516,9 @@ class TestBuildStandard: + tar_archive.extractall(str(extraction_directory)) + + expected_files = helpers.get_template_files( +- 'sdist.standard_default', project_name, relative_root=builder.project_id ++ 'sdist.standard_default', project_name, relative_root=builder.artifact_project_id + ) + helpers.assert_files(extraction_directory, expected_files) + +- stat = os.stat(str(extraction_directory / builder.project_id / 'PKG-INFO')) ++ stat = os.stat(str(extraction_directory / builder.artifact_project_id / 'PKG-INFO')) + assert stat.st_mtime == get_reproducible_timestamp() diff --git a/python-hatch.changes b/python-hatch.changes index 0f532e9..cc3fd4e 100644 --- a/python-hatch.changes +++ b/python-hatch.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 10 16:07:25 UTC 2023 - Daniel Garcia + +- Add fix-sdist-target.patch to fix tests: gh#pypa/hatch@1b10663e645e + ------------------------------------------------------------------- Fri May 5 10:45:53 UTC 2023 - Dirk Müller diff --git a/python-hatch.spec b/python-hatch.spec index 575ddce..7ba33fb 100644 --- a/python-hatch.spec +++ b/python-hatch.spec @@ -33,6 +33,8 @@ License: MIT URL: https://hatch.pypa.io/latest/ # SourceRepository: https://github.com/pypa/hatch Source: https://github.com/pypa/hatch/archive/refs/tags/hatch-v%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-sdist-target.patch -- gh#pypa/hatch@1b10663e645e +Patch0: fix-sdist-target.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module hatchling >= 1.14} BuildRequires: %{python_module pip}