Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-hatch for openSUSE:Factory 
checked in at 2023-06-21 22:40:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hatch (Old)
 and      /work/SRC/openSUSE:Factory/.python-hatch.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-hatch"

Wed Jun 21 22:40:34 2023 rev:7 rq:1094474 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hatch/python-hatch.changes        
2023-05-11 12:34:07.642892143 +0200
+++ /work/SRC/openSUSE:Factory/.python-hatch.new.15902/python-hatch.changes     
2023-06-21 22:41:26.138940424 +0200
@@ -1,0 +2,11 @@
+Wed Jun 21 08:39:40 UTC 2023 - Ben Greiner <c...@bnavigator.de>
+
+- Add hatch-pr828-pth-tests.patch, gh#pypa/hatch#828 fixing
+  test failure with hatchling >= 1.17.1
+
+-------------------------------------------------------------------
+Sun Jun 11 08:38:31 UTC 2023 - ecsos <ec...@opensuse.org>
+
+- Add %{?sle15_python_module_pythons}
+
+-------------------------------------------------------------------

New:
----
  hatch-pr828-pth-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-hatch.spec ++++++
--- /var/tmp/diff_new_pack.1o1OKU/_old  2023-06-21 22:41:26.722943939 +0200
+++ /var/tmp/diff_new_pack.1o1OKU/_new  2023-06-21 22:41:26.726943962 +0200
@@ -24,7 +24,7 @@
 %define psuffix %{nil}
 %bcond_with test
 %endif
-
+%{?sle15_python_module_pythons}
 Name:           python-hatch%{psuffix}
 Version:        1.7.0
 Release:        0
@@ -35,6 +35,8 @@
 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
+# PATCH-FIX-UPSTREAM hatch-pr828-pth-tests.patch, gh#pypa/hatch#828
+Patch1:         hatch-pr828-pth-tests.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module hatchling >= 1.14}
 BuildRequires:  %{python_module pip}
@@ -48,6 +50,8 @@
 %if %{with test}
 BuildRequires:  %{python_module filelock >= 3.7.1}
 BuildRequires:  %{python_module hatch = %{version}}
+# Due to Patch1, gh#pypa/hatch#828
+BuildRequires:  %{python_module hatchling >= 1.17.1}
 BuildRequires:  %{python_module pytest-mock}
 BuildRequires:  %{python_module pytest-randomly}
 BuildRequires:  %{python_module pytest-rerunfailures}

++++++ hatch-pr828-pth-tests.patch ++++++
>From d07463ea6afcecd83fd55bdac975516de6f3bc10 Mon Sep 17 00:00:00 2001
From: Ryan Morshead <ryan.morsh...@gmail.com>
Date: Mon, 17 Apr 2023 22:02:59 -0700
Subject: [PATCH 1/3] Name .pth file so it loads first

Users adding their own .pth files likely need to be loaded after the one 
inserted by hatchling. The only way to do this is by naming it so the hatchling 
.pth file comes first alphabetically.
---
 backend/src/hatchling/builders/wheel.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: hatch-hatch-v1.7.0/backend/src/hatchling/builders/wheel.py
===================================================================
--- hatch-hatch-v1.7.0.orig/backend/src/hatchling/builders/wheel.py
+++ hatch-hatch-v1.7.0/backend/src/hatchling/builders/wheel.py
@@ -438,6 +438,9 @@ class WheelBuilder(BuilderInterface):
                     
editable_project.add_to_path(os.path.dirname(relative_path))
 
             for filename, content in sorted(editable_project.files()):
+                if filename.endswith('.pth') and not filename.startswith('_'):
+                    filename = f'_{filename}'
+
                 record = archive.write_file(filename, content)
                 records.write(record)
 
@@ -475,7 +478,7 @@ class WheelBuilder(BuilderInterface):
                 for relative_directory in self.config.dev_mode_dirs
             )
 
-            record = 
archive.write_file(f"{self.metadata.core.name.replace('-', '_')}.pth", 
'\n'.join(directories))
+            record = 
archive.write_file(f"_{self.metadata.core.name.replace('-', '_')}.pth", 
'\n'.join(directories))
             records.write(record)
 
             for included_file in 
self.recurse_forced_files(self.get_forced_inclusion_map(build_data)):
Index: 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_exact.py
===================================================================
--- 
hatch-hatch-v1.7.0.orig/tests/helpers/templates/wheel/standard_editable_exact.py
+++ hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_exact.py
@@ -16,7 +16,7 @@ def get_files(**kwargs):
         if str(f.path) == 'LICENSE.txt':
             files.append(File(Path(metadata_directory, 'licenses', f.path), 
f.contents))
 
-    pth_file_name = f"{kwargs['package_name']}.pth"
+    pth_file_name = f"_{kwargs['package_name']}.pth"
     loader_file_name = f"_editable_impl_{kwargs['package_name']}.py"
     files.append(File(Path(pth_file_name), f"import 
_editable_impl_{kwargs['package_name']}"))
     files.append(
Index: 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_exact_extra_dependencies.py
===================================================================
--- 
hatch-hatch-v1.7.0.orig/tests/helpers/templates/wheel/standard_editable_exact_extra_dependencies.py
+++ 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_exact_extra_dependencies.py
@@ -16,7 +16,7 @@ def get_files(**kwargs):
         if str(f.path) == 'LICENSE.txt':
             files.append(File(Path(metadata_directory, 'licenses', f.path), 
f.contents))
 
-    pth_file_name = f"{kwargs['package_name']}.pth"
+    pth_file_name = f"_{kwargs['package_name']}.pth"
     loader_file_name = f"_editable_impl_{kwargs['package_name']}.py"
     files.append(File(Path(pth_file_name), f"import 
_editable_impl_{kwargs['package_name']}"))
     files.append(
Index: 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_exact_force_include.py
===================================================================
--- 
hatch-hatch-v1.7.0.orig/tests/helpers/templates/wheel/standard_editable_exact_force_include.py
+++ 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_exact_force_include.py
@@ -18,7 +18,7 @@ def get_files(**kwargs):
         elif f.path.parts[-1] == '__about__.py':
             files.append(File(Path('zfoo.py'), f.contents))
 
-    pth_file_name = f"{kwargs['package_name']}.pth"
+    pth_file_name = f"_{kwargs['package_name']}.pth"
     loader_file_name = f"_editable_impl_{kwargs['package_name']}.py"
     files.append(File(Path(pth_file_name), f"import 
_editable_impl_{kwargs['package_name']}"))
     files.append(
Index: hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_pth.py
===================================================================
--- 
hatch-hatch-v1.7.0.orig/tests/helpers/templates/wheel/standard_editable_pth.py
+++ hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_pth.py
@@ -16,7 +16,7 @@ def get_files(**kwargs):
         if str(f.path) == 'LICENSE.txt':
             files.append(File(Path(metadata_directory, 'licenses', f.path), 
f.contents))
 
-    pth_file_name = f"{kwargs['package_name']}.pth"
+    pth_file_name = f"_{kwargs['package_name']}.pth"
     files.append(File(Path(pth_file_name), '\n'.join(package_paths)))
     files.append(
         File(
Index: 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_pth_extra_dependencies.py
===================================================================
--- 
hatch-hatch-v1.7.0.orig/tests/helpers/templates/wheel/standard_editable_pth_extra_dependencies.py
+++ 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_pth_extra_dependencies.py
@@ -16,7 +16,7 @@ def get_files(**kwargs):
         if str(f.path) == 'LICENSE.txt':
             files.append(File(Path(metadata_directory, 'licenses', f.path), 
f.contents))
 
-    pth_file_name = f"{kwargs['package_name']}.pth"
+    pth_file_name = f"_{kwargs['package_name']}.pth"
     files.append(File(Path(pth_file_name), '\n'.join(package_paths)))
     files.append(
         File(
Index: 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_pth_force_include.py
===================================================================
--- 
hatch-hatch-v1.7.0.orig/tests/helpers/templates/wheel/standard_editable_pth_force_include.py
+++ 
hatch-hatch-v1.7.0/tests/helpers/templates/wheel/standard_editable_pth_force_include.py
@@ -18,7 +18,7 @@ def get_files(**kwargs):
         elif f.path.parts[-1] == '__about__.py':
             files.append(File(Path('zfoo.py'), f.contents))
 
-    pth_file_name = f"{kwargs['package_name']}.pth"
+    pth_file_name = f"_{kwargs['package_name']}.pth"
     files.append(File(Path(pth_file_name), '\n'.join(package_paths)))
     files.append(
         File(

Reply via email to