Mageia Bugzilla – Attachment 14409 Details for
Bug 32880
upgrade python-pyaml and switch to pyproject
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
pyaml spec patch
python-pyaml.spec.patch (text/plain), 2.65 KB, created by
Aurelian R
on 2024-02-21 23:21:02 CET
(
hide
)
Description:
pyaml spec patch
Filename:
MIME Type:
Creator:
Aurelian R
Created:
2024-02-21 23:21:02 CET
Size:
2.65 KB
patch
obsolete
>--- python-pyaml/python-pyaml.spec 2024-02-21 22:04:40.287195195 +0200 >+++ SPECS/python-pyaml.spec 2024-02-22 00:18:37.005681883 +0200 >@@ -1,11 +1,10 @@ >-# Created by pyp2rpm-1.1.2 > %global pypi_name pyaml >-%global with_python3 1 >-%define version 18.11.0 >+ >+%bcond_without tests > > Name: python-pyaml >-Version: %{version} >-Release: %mkrel 7 >+Version: 23.12.0 >+Release: %mkrel 0.1 > Group: Development/Python > Summary: PyYAML-based module to produce pretty and readable YAML-serialized data > >@@ -14,10 +13,12 @@ URL: https://github.com/mk-fg > Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz > BuildArch: noarch > >-%if %{?with_python3} > BuildRequires: python3-devel >-BuildRequires: python3-setuptools >-%endif # if with_python3 >+BuildRequires: python3dist(pyyaml) >+%if %{with tests} >+BuildRequires: python3dist(unidecode) >+BuildRequires: python3dist(pytest) >+%endif > > %description > YAML is generally nice and easy format to read *if* it was written by >@@ -26,11 +27,11 @@ humans. > PyYAML can a do fairly decent job of making stuff readable, and the > best combination of parameters for such output that I've seen so far. > >-%if 0%{?with_python3} > %package -n python3-%{pypi_name} > Summary: PyYAML-based module to produce pretty and readable YAML-serialized data > > Requires: python3-yaml >+Recommends: python3-unidecode > > %description -n python3-%{pypi_name} > YAML is generally nice and easy format to read *if* it was written by >@@ -38,38 +39,30 @@ humans. > > PyYAML can a do fairly decent job of making stuff readable, and the > best combination of parameters for such output that I've seen so far. >-%endif # with_python3 > > > %prep >-%setup -q -n %{pypi_name}-%{version} >+%autosetup -n %{pypi_name}-%{version} >+ > # Remove bundled egg-info > rm -rf %{pypi_name}.egg-info > >-%if 0%{?with_python3} >-find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' >-%endif # with_python3 >- >- > %generate_buildrequires > %pyproject_buildrequires > > %build >-%if 0%{?with_python3} >-%py3_build >-%endif # with_python3 >- >+%pyproject_wheel > > %install >-%if 0%{?with_python3} >-%{__python3} setup.py install --skip-build --root %{buildroot} >-%endif # with_python3 >+%pyproject_install >+%pyproject_save_files %{pypi_name} > >+%check >+%pyproject_check_import >+%{?with_tests:%pytest} > >-%if 0%{?with_python3} >-%files -n python3-%{pypi_name} >+%files -n python3-%{pypi_name} -f %{pyproject_files} > %doc README.rst >-%{python3_sitelib}/%{pypi_name} >-%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info >-%endif # with_python3 >+%license COPYING >+%{_bindir}/%{pypi_name} >
--- python-pyaml/python-pyaml.spec 2024-02-21 22:04:40.287195195 +0200 +++ SPECS/python-pyaml.spec 2024-02-22 00:18:37.005681883 +0200 @@ -1,11 +1,10 @@ -# Created by pyp2rpm-1.1.2 %global pypi_name pyaml -%global with_python3 1 -%define version 18.11.0 + +%bcond_without tests Name: python-pyaml -Version: %{version} -Release: %mkrel 7 +Version: 23.12.0 +Release: %mkrel 0.1 Group: Development/Python Summary: PyYAML-based module to produce pretty and readable YAML-serialized data @@ -14,10 +13,12 @@ URL: https://github.com/mk-fg Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -%if %{?with_python3} BuildRequires: python3-devel -BuildRequires: python3-setuptools -%endif # if with_python3 +BuildRequires: python3dist(pyyaml) +%if %{with tests} +BuildRequires: python3dist(unidecode) +BuildRequires: python3dist(pytest) +%endif %description YAML is generally nice and easy format to read *if* it was written by @@ -26,11 +27,11 @@ humans. PyYAML can a do fairly decent job of making stuff readable, and the best combination of parameters for such output that I've seen so far. -%if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: PyYAML-based module to produce pretty and readable YAML-serialized data Requires: python3-yaml +Recommends: python3-unidecode %description -n python3-%{pypi_name} YAML is generally nice and easy format to read *if* it was written by @@ -38,38 +39,30 @@ humans. PyYAML can a do fairly decent job of making stuff readable, and the best combination of parameters for such output that I've seen so far. -%endif # with_python3 %prep -%setup -q -n %{pypi_name}-%{version} +%autosetup -n %{pypi_name}-%{version} + # Remove bundled egg-info rm -rf %{pypi_name}.egg-info -%if 0%{?with_python3} -find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' -%endif # with_python3 - - %generate_buildrequires %pyproject_buildrequires %build -%if 0%{?with_python3} -%py3_build -%endif # with_python3 - +%pyproject_wheel %install -%if 0%{?with_python3} -%{__python3} setup.py install --skip-build --root %{buildroot} -%endif # with_python3 +%pyproject_install +%pyproject_save_files %{pypi_name} +%check +%pyproject_check_import +%{?with_tests:%pytest} -%if 0%{?with_python3} -%files -n python3-%{pypi_name} +%files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info -%endif # with_python3 +%license COPYING +%{_bindir}/%{pypi_name}
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32880
: 14409