From cd2ee1d16e3a3ec1fdd7bee9aa3cd34a82d3ac187b3d19d8fdca32c54aa784e6 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 29 May 2023 11:42:58 +0000 Subject: [PATCH] - add sle15_python_module_pythons (jsc#PED-68) - Use pyproject to build the package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cogapp?expand=0&rev=13 --- python-cogapp.changes | 6 ++++++ python-cogapp.spec | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/python-cogapp.changes b/python-cogapp.changes index 5527741..db6795a 100644 --- a/python-cogapp.changes +++ b/python-cogapp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 29 11:38:28 UTC 2023 - Daniel Garcia + +- add sle15_python_module_pythons (jsc#PED-68) +- Use pyproject to build the package + ------------------------------------------------------------------- Tue Sep 27 06:52:19 UTC 2022 - Daniel Garcia diff --git a/python-cogapp.spec b/python-cogapp.spec index 8502b50..708e46f 100644 --- a/python-cogapp.spec +++ b/python-cogapp.spec @@ -1,7 +1,7 @@ # # spec file for package python-cogapp # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-cogapp Version: 3.3.0 Release: 0 @@ -25,8 +25,10 @@ License: MIT Group: Development/Languages/Python URL: http://nedbatchelder.com/code/cog Source: https://files.pythonhosted.org/packages/source/c/cogapp/cogapp-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives @@ -40,13 +42,13 @@ as generators in your source files to generate whatever text you need. %prep -%setup -q -n cogapp-%{version} +%autosetup -p1 -n cogapp-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} mv %{buildroot}%{_bindir}/cog.py %{buildroot}%{_bindir}/cog %python_clone -a %{buildroot}%{_bindir}/cog @@ -65,6 +67,7 @@ mv %{buildroot}%{_bindir}/cog.py %{buildroot}%{_bindir}/cog %license LICENSE.txt %doc README.rst %python_alternative %{_bindir}/cog -%{python_sitelib}/* +%{python_sitelib}/cogapp +%{python_sitelib}/cogapp-%{version}*-info %changelog