From 708ecb52d1457676a8b8944ae00c2994c6dad051cafa16879f75ecc0de5bfeeb Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 28 Nov 2023 09:40:37 +0000 Subject: [PATCH] Accepting request 1129254 from home:theMarix:branches:devel:languages:python - For Leap, build this on modern Python as 3.6 is no longer supported. - On Leap, use Lua 5.3 as luarocks is not packaged for Lua 5.4. - On Leap, disable Perl install test as that requires network for CPAN initialisation. Note that, right now, this won't fix the 15.6 build as the dependency python-editdistance is from devel:languages:python:numeric and the fixed version in that repo is not visible in devel:languages:python. However, this will at least give us a working build on devel:languages:python:backports. And once the fixed version of python-editdistance makes it into 15.6 we will also get a working build for 15.6 over here. OBS-URL: https://build.opensuse.org/request/show/1129254 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pre-commit?expand=0&rev=29 --- python-pre-commit.changes | 8 ++++++++ python-pre-commit.spec | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/python-pre-commit.changes b/python-pre-commit.changes index 5b17043..65c0578 100644 --- a/python-pre-commit.changes +++ b/python-pre-commit.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Nov 27 20:27:50 UTC 2023 - Matthias Bach - 3.5.0 + +- For Leap, build this on modern Python as 3.6 is no longer supported. +- On Leap, use Lua 5.3 as luarocks is not packaged for Lua 5.4. +- On Leap, disable Perl install test as that requires network for + CPAN initialisation. + ------------------------------------------------------------------- Wed Nov 1 10:32:51 UTC 2023 - Matthias Fehring - 3.5.0 diff --git a/python-pre-commit.spec b/python-pre-commit.spec index d5dac57..c9ee49e 100644 --- a/python-pre-commit.spec +++ b/python-pre-commit.spec @@ -16,7 +16,7 @@ # -%define skip_python2 1 +%{?sle15_python_module_pythons} Name: python-pre-commit Version: 3.5.0 Release: 0 @@ -26,8 +26,6 @@ URL: https://github.com/pre-commit/pre-commit Source: https://github.com/pre-commit/pre-commit/archive/v%{version}.tar.gz#/pre-commit-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: lua54-devel -BuildRequires: lua54-luarocks BuildRequires: python-rpm-macros Requires: python-PyYAML >= 5.1 Requires: python-cfgv >= 2.0.0 @@ -35,8 +33,15 @@ Requires: python-identify >= 1.0.0 Requires: python-nodeenv >= 0.11.1 Requires: python-virtualenv >= 20.10.0 Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch +%if 0%{?sle_version} <= 150600 && 0%{?is_opensuse} +BuildRequires: lua53-devel +BuildRequires: lua53-luarocks +%else +BuildRequires: lua54-devel +BuildRequires: lua54-luarocks +%endif # SECTION test requirements BuildRequires: %{python_module PyYAML >= 5.1} BuildRequires: %{python_module cfgv >= 2.0.0} @@ -94,6 +99,11 @@ EXCLUDED_TESTS="$EXCLUDED_TESTS or test_local_python_repo_python2 or rust_test" EXCLUDED_TESTS="$EXCLUDED_TESTS or test_run_example_executable or test_run_dep or test_perl_additional_dependencies or test_lua_additional_dependencies" # requires swift EXCLUDED_TESTS="$EXCLUDED_TESTS or test_swift_language" +%if 0%{?sle_version} <= 150600 && 0%{?is_opensuse} +# requires network on Leap +EXCLUDED_TESTS="$EXCLUDED_TESTS or test_perl_install" +%endif + # Fix issue with git submodule in OBS git config --global --add protocol.file.allow always