Accepting request 1162483 from devel:languages:python

- Add patch support-hatchling-1.22.patch:
  * Support updates for the new Hatchling.
- Add missing BuildRequires on editables, required for tests.

- update to 1.9.4:
  * Limit the maximum version of Hatchling in anticipation of
    backward incompatible changes
- update to 1.9.3:
  * Fix loading of local plugins to account for newly released
    versions of a dependency
- update to 1.9.2:
  * Fix the default token variable name for publishing to PyPI

OBS-URL: https://build.opensuse.org/request/show/1162483
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hatch?expand=0&rev=13
This commit is contained in:
Ana Guerrero 2024-03-27 19:42:30 +00:00 committed by Git OBS Bridge
commit 61123d7067
5 changed files with 85 additions and 7 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6769f71ae5c570122749e0028b3867cf285e0517b685a8f3d4ec7073c9af2e4e
size 768341

3
hatch-v1.9.4.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1cafce05e853e9a878e24ab519a18863cf27e21a3aa11a8f6d92b0a3606ca583
size 768420

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Wed Mar 27 02:59:47 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-hatchling-1.22.patch:
* Support updates for the new Hatchling.
- Add missing BuildRequires on editables, required for tests.
-------------------------------------------------------------------
Sun Mar 24 13:24:46 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.9.4:
* Limit the maximum version of Hatchling in anticipation of
backward incompatible changes
- update to 1.9.3:
* Fix loading of local plugins to account for newly released
versions of a dependency
- update to 1.9.2:
* Fix the default token variable name for publishing to PyPI
-------------------------------------------------------------------
Mon Dec 25 09:52:54 UTC 2023 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-hatch
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -26,13 +26,17 @@
%endif
%{?sle15_python_module_pythons}
Name: python-hatch%{psuffix}
Version: 1.9.1
Version: 1.9.4
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 Based on parts of the following commits:
# gh#pypa/hatch#9a80ffc2567bb09160e97f1ade1dd4c768004089
# gh#pypa/hatch#f3b2159a8c4221062692881774bc58dfed5aaa76
Patch0: support-hatchling-1.22.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatch-vcs >= 0.3}
BuildRequires: %{python_module hatchling >= 1.19}
@ -40,7 +44,7 @@ BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
Requires: git-core
Requires: python-click >= 8.0.6
Requires: python-hatchling >= 1.21.0
@ -58,6 +62,7 @@ Requires: python-zstandard < 1
Requires: (python-pexpect >= 4.8 with python-pexpect < 5)
Requires: (python-userpath >= 1.7 with python-userpath < 2)
%if %{with test}
BuildRequires: %{python_module editables}
BuildRequires: %{python_module filelock >= 3.7.1}
BuildRequires: %{python_module hatch = %{version}}
BuildRequires: %{python_module pytest-mock}

View File

@ -0,0 +1,54 @@
Index: hatch-hatch-v1.9.4/tests/backend/builders/test_wheel.py
===================================================================
--- hatch-hatch-v1.9.4.orig/tests/backend/builders/test_wheel.py
+++ hatch-hatch-v1.9.4/tests/backend/builders/test_wheel.py
@@ -161,15 +161,18 @@ class TestDefaultFileSelection:
ValueError,
match=(
'Unable to determine which files to ship inside the wheel using the following heuristics: '
- 'https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection\n\nAt least one '
- 'file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: '
- 'https://hatch.pypa.io/latest/config/build/\n\nAs an example, if you intend to ship a '
- 'directory named `foo` that resides within a `src` directory located at the root of your '
- 'project, you can define the following:\n\n\\[tool.hatch.build.targets.wheel\\]\n'
+ 'https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection\n\n'
+ 'The most likely cause of this is that there is no directory that matches the name of your '
+ 'project \\(my_app\\).\n\n'
+ 'At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` '
+ 'table, see: https://hatch.pypa.io/latest/config/build/\n\n'
+ 'As an example, if you intend to ship a directory named `foo` that resides within a `src` '
+ 'directory located at the root of your project, you can define the following:\n\n'
+ '\\[tool.hatch.build.targets.wheel\\]\n'
'packages = \\["src/foo"\\]'
),
):
- _ = method()
+ method()
def test_bypass_selection_option(self, temp_dir):
config = {
Index: hatch-hatch-v1.9.4/tests/backend/builders/plugin/test_interface.py
===================================================================
--- hatch-hatch-v1.9.4.orig/tests/backend/builders/plugin/test_interface.py
+++ hatch-hatch-v1.9.4/tests/backend/builders/plugin/test_interface.py
@@ -62,7 +62,7 @@ class TestMetadata:
config = {'project': {}}
builder = MockBuilder(str(isolation), config=config)
- assert builder.project_config is builder.project_config is config['project']
+ assert builder.project_config == builder.project_config == config['project']
def test_hatch(self, isolation):
config = {'tool': {'hatch': {}}}
Index: hatch-hatch-v1.9.4/tests/backend/metadata/test_core.py
===================================================================
--- hatch-hatch-v1.9.4.orig/tests/backend/metadata/test_core.py
+++ hatch-hatch-v1.9.4/tests/backend/metadata/test_core.py
@@ -84,7 +84,6 @@ class TestDynamic:
dynamic = ['version']
metadata = ProjectMetadata(str(isolation), None, {'project': {'dynamic': dynamic}})
- assert metadata.core.dynamic is dynamic
assert metadata.core.dynamic == ['version']
def test_cache_not_array(self, isolation):