[packages/python3-pyparsing] - python-pyparsing.spec updated to 3.0.7 for python 3.6+
qboosh
qboosh at pld-linux.org
Sat Mar 5 13:02:25 CET 2022
commit f0b5730f2a7e4ed46e375ea5bec74abaab7b1f1a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 5 13:04:20 2022 +0100
- python-pyparsing.spec updated to 3.0.7 for python 3.6+
python-pyparsing.spec => python3-pyparsing.spec | 88 ++++++-------------------
1 file changed, 21 insertions(+), 67 deletions(-)
---
diff --git a/python-pyparsing.spec b/python3-pyparsing.spec
similarity index 56%
rename from python-pyparsing.spec
rename to python3-pyparsing.spec
index 2682553..a7e15fc 100644
--- a/python-pyparsing.spec
+++ b/python3-pyparsing.spec
@@ -1,36 +1,30 @@
#
# Conditional build:
%bcond_without doc # Sphinx documentation
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
+%bcond_without tests # unit tests
%define module pyparsing
-Summary: pyparsing - Python 2 module for creating executing simple grammars
-Summary(pl.UTF-8): pyparsing - moduł Pythona 2 umożliwiający tworzenie i parsowanie prostych gramatyk
-Name: python-%{module}
-# keep 2.x here for python2 support
-Version: 2.4.7
+Summary: pyparsing - Python 3 module for creating executing simple grammars
+Summary(pl.UTF-8): pyparsing - moduł Pythona 3 umożliwiający tworzenie i parsowanie prostych gramatyk
+Name: python3-%{module}
+Version: 3.0.7
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/pyparsing/
Source0: https://files.pythonhosted.org/packages/source/p/pyparsing/%{module}-%{version}.tar.gz
-# Source0-md5: f0953e47a0112f7a65aec2305ffdf7b4
+# Source0-md5: 9d38774991175444e21a3dfa865876cc
URL: https://github.com/pyparsing/pyparsing/
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.6
-BuildRequires: python-modules >= 1:2.6
-BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.3
-BuildRequires: python3-modules >= 1:3.3
+BuildRequires: python3-devel >= 1:3.6
+BuildRequires: python3-modules >= 1:3.6
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
%endif
-%{?with_doc:BuildRequires: sphinx-pdg-2}
-Requires: python-modules >= 1:2.6
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%{?with_doc:BuildRequires: sphinx-pdg-3}
+Requires: python3-modules >= 1:3.6
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -48,26 +42,6 @@ pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
Pythona.
-%package -n python3-%{module}
-Summary: pyparsing - Python 3 module for creating executing simple grammars
-Summary(pl.UTF-8): pyparsing - moduł Pythona 3 umożliwiający tworzenie i parsowanie prostych gramatyk
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.3
-
-%description -n python3-%{module}
-The parsing module is an alternative approach to creating and
-executing simple grammars, vs. the traditional lex/yacc approach, or
-the use of regular expressions. The parsing module provides a library
-of classes that client code uses to construct the grammar directly in
-Python code.
-
-%description -n python3-%{module} -l pl.UTF-8
-Moduł pyparsing umożliwia tworzenie i parsowanie prostych gramatyk w
-sposób odmienny od podejścia tradycyjnego, jakim jest zwykle użycie
-pary lex/yacc lub wyrażeń regularnych. Moduł ten udostępnia bibliotekę
-klas, przy pomocy których gramatyka tworzona jest wprost w kodzie
-Pythona.
-
%package doc
Summary: Documentation for pyparsing module
Summary(pl.UTF-8): Dokumentacja do modułu pyparsing
@@ -96,54 +70,34 @@ Pakiet zawierający przykładowe skrypty dla modułu Pythona pyparsing.
%setup -q -n %{module}-%{version}
%build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
%endif
%if %{with doc}
%{__make} -C docs html \
- SPHINXBUILD=sphinx-build-2
+ SPHINXBUILD=sphinx-build-3
%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{py_sitescriptdir},%{_examplesdir}/%{name}-%{version}}
-
-%if %{with python2}
-%py_install
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
-%endif
cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES LICENSE README.rst
-%{py_sitescriptdir}/pyparsing.py[co]
-%{py_sitescriptdir}/pyparsing-*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES LICENSE README.rst
-%{py3_sitescriptdir}/pyparsing.py
-%{py3_sitescriptdir}/__pycache__/pyparsing*.py[co]
+%{py3_sitescriptdir}/pyparsing
%{py3_sitescriptdir}/pyparsing-*.egg-info
-%endif
%if %{with doc}
%files doc
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pyparsing.git/commitdiff/f0b5730f2a7e4ed46e375ea5bec74abaab7b1f1a
More information about the pld-cvs-commit
mailing list