[packages/python3-PyYAML] - python-PyYAML.spec updated to 6.0.1 for python 3.6+
qboosh
qboosh at pld-linux.org
Wed Mar 13 18:57:09 CET 2024
commit fc99a195005f23c42f85cf6e1b9b6220cf3a2278
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Mar 13 18:34:36 2024 +0100
- python-PyYAML.spec updated to 6.0.1 for python 3.6+
python-PyYAML.spec => python3-PyYAML.spec | 88 +++++--------------------------
1 file changed, 12 insertions(+), 76 deletions(-)
---
diff --git a/python-PyYAML.spec b/python3-PyYAML.spec
similarity index 54%
rename from python-PyYAML.spec
rename to python3-PyYAML.spec
index 5555d9d..197ab4b 100644
--- a/python-PyYAML.spec
+++ b/python3-PyYAML.spec
@@ -1,38 +1,29 @@
# note: uses name after egg/pypi; import name is "yaml", source is "pyyaml"
#
# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
%bcond_without tests # unit tests
%define module PyYAML
-Summary: YAML parser and emitter module for Python 2
-Summary(pl.UTF-8): Analizator i generator formatu YAML dla języka Python 2
-Name: python-%{module}
-# keep 5.x here for python2 support
-Version: 5.4.1.1
+Summary: YAML parser and emitter module for Python 3
+Summary(pl.UTF-8): Analizator i generator formatu YAML dla języka Python 3
+Name: python3-%{module}
+Version: 6.0.1
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://github.com/yaml/pyyaml/tags
Source0: https://github.com/yaml/pyyaml/archive/%{version}/pyyaml-%{version}.tar.gz
-# Source0-md5: 6ea31369c4e4c852a58e772592c971e7
+# Source0-md5: e1ceb8ac30446570c787678c1301ceed
URL: https://github.com/yaml/pyyaml
+BuildRequires: python3-Cython < 3
+BuildRequires: python3-devel >= 1:3.6
+BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-setuptools
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: sed >= 4.0
BuildRequires: yaml-devel >= 0.2.2
-%if %{with python2}
-BuildRequires: python-Cython
-BuildRequires: python-devel >= 1:2.7
-BuildRequires: python-modules >= 1:2.7
-%endif
-%if %{with python3}
-BuildRequires: python3-Cython
-BuildRequires: python3-devel >= 1:3.5
-BuildRequires: python3-modules >= 1:3.5
-%endif
-Requires: python-modules >= 1:2.7
+Requires: python3-modules >= 1:3.6
Requires: yaml >= 0.2.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -63,84 +54,30 @@ obiektów.
PyYAML może być użyty w szerokiej gamie zastosowań, od złożonych
plików konfiguracyjnych po serializację i przechowywanie obiektów.
-%package -n python3-%{module}
-Summary: YAML parser and emitter module for Python 3
-Summary(pl.UTF-8): Analizator i generator formatu YAML dla języka Python 3
-Group: Libraries/Python
-Requires: yaml >= 0.2.2
-Requires: python3-modules >= 1:3.5
-
-%description -n python3-%{module}
-PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
-support, capable extension API, and sensible error messages. PyYAML
-supports standard YAML tags and provides Python-specific tags that
-allow to represent an arbitrary Python object.
-
-%description -n python3-%{module} -l pl.UTF-8
-PyYAML posiada obsługę pełnej analizy YAML 1.1, Unicode, serializację
-poprzez piklowanie, rozszerzalne API oraz zrozumiałe komunikaty
-błędów. Obsługuje standardowe znaczniki YAML i dostarcza nowe,
-specyficzne dla języka Python, pozwalające na reprezentację jego
-obiektów.
-
%prep
%setup -q -n pyyaml-%{version}
%build
-%if %{with python2}
-CC="%{__cc}" \
-CFLAGS="%{rpmcflags}" \
-%{__python} setup.py --with-libyaml \
- build --build-base build-2 %{?with_tests:test}
-%endif
-%if %{with python3}
CC="%{__cc}" \
CFLAGS="%{rpmcflags}" \
%{__python3} setup.py --with-libyaml \
build --build-base build-3 %{?with_tests:test}
-%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -p examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%{__sed} -i -e '1s,/usr/bin/python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/yaml_hl.py
-%endif
-
-%if %{with python3}
%py3_install
install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-PyYAML-%{version}
cp -p examples/yaml-highlight/* $RPM_BUILD_ROOT%{_examplesdir}/python3-PyYAML-%{version}
%{__sed} -i -e '1s,/usr/bin/python,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-PyYAML-%{version}/yaml_hl.py
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc CHANGES LICENSE README
-%dir %{py_sitedir}/_yaml
-%{py_sitedir}/_yaml/*.py[co]
-%dir %{py_sitedir}/yaml
-%{py_sitedir}/yaml/*.py[co]
-%attr(755,root,root) %{py_sitedir}/yaml/_yaml.so
-%{py_sitedir}/PyYAML-5.4.1-py*.egg-info
-%{_examplesdir}/%{name}-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES LICENSE README
+%doc CHANGES LICENSE README.md
%dir %{py3_sitedir}/_yaml
%{py3_sitedir}/_yaml/*.py
%{py3_sitedir}/_yaml/__pycache__
@@ -148,6 +85,5 @@ rm -rf $RPM_BUILD_ROOT
%{py3_sitedir}/yaml/*.py
%{py3_sitedir}/yaml/__pycache__
%attr(755,root,root) %{py3_sitedir}/yaml/_yaml.cpython-*.so
-%{py3_sitedir}/PyYAML-5.4.1-py*.egg-info
+%{py3_sitedir}/PyYAML-%{version}-py*.egg-info
%{_examplesdir}/python3-PyYAML-%{version}
-%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-PyYAML.git/commitdiff/fc99a195005f23c42f85cf6e1b9b6220cf3a2278
More information about the pld-cvs-commit
mailing list