2022-07-15 09:30:39 +00:00
|
|
|
Summary: Python package with an object-oriented approach to text processing
|
2015-11-17 18:35:06 +00:00
|
|
|
Name: pyparsing
|
2023-11-19 17:14:40 +00:00
|
|
|
Version: 3.1.1
|
2022-07-14 17:42:31 +00:00
|
|
|
Release: %autorelease
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2023-07-12 09:58:14 +00:00
|
|
|
# SPDX
|
2005-08-03 19:08:56 +00:00
|
|
|
License: MIT
|
2019-01-10 10:27:15 +00:00
|
|
|
URL: https://github.com/pyparsing/pyparsing
|
2023-11-19 17:14:40 +00:00
|
|
|
Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
BuildArch: noarch
|
2010-10-25 12:18:40 +00:00
|
|
|
BuildRequires: dos2unix
|
2023-03-15 23:13:17 +00:00
|
|
|
|
|
|
|
# python3 bootstrap: this is built before the final build of python3, which
|
|
|
|
# adds the dependency on python3-rpm-generators, so we require it manually
|
|
|
|
# (python BuildRequires systemtap-sdt-devel which requires python3-pyparsing)
|
|
|
|
BuildRequires: python3-rpm-generators
|
|
|
|
# We need those for the same reason:
|
|
|
|
%bcond doc 1
|
|
|
|
%bcond tests 1
|
|
|
|
|
2020-09-07 10:07:21 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
2023-03-15 23:13:17 +00:00
|
|
|
|
|
|
|
%if %{with doc}
|
2020-09-07 10:07:21 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
2023-03-15 23:13:17 +00:00
|
|
|
%endif
|
|
|
|
%if %{with tests}
|
2022-07-14 19:06:53 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
2023-03-15 23:13:17 +00:00
|
|
|
%endif
|
|
|
|
|
2022-07-14 19:06:53 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
%description
|
|
|
|
pyparsing is a module that can be used to easily and directly configure syntax
|
|
|
|
definitions for any number of text parsing applications.
|
|
|
|
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2022-07-15 09:30:39 +00:00
|
|
|
%package -n python%{python3_pkgversion}-pyparsing
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-pyparsing
|
|
|
|
pyparsing is a module that can be used to easily and directly configure syntax
|
|
|
|
definitions for any number of text parsing applications.
|
|
|
|
|
|
|
|
|
2023-03-15 23:13:17 +00:00
|
|
|
%if %{with doc}
|
2015-11-17 18:35:06 +00:00
|
|
|
%package doc
|
2022-07-15 09:30:39 +00:00
|
|
|
Summary: Documentation for %{name}
|
2010-10-25 12:18:40 +00:00
|
|
|
|
2021-05-27 13:20:28 +00:00
|
|
|
# Most examples are under the project's license, MIT
|
2023-07-12 09:58:14 +00:00
|
|
|
# pymicko.py is under GPL-3.0-or-later
|
|
|
|
# snmp_api.h is under MIT-CMU
|
|
|
|
# sparser.py is under GPL-2.0-or-later
|
|
|
|
# searchparser.py and booleansearchparser.py are under BSD-3-Clause
|
|
|
|
# btpyparse.py is under "Simplified BSD license" -> BSD-2-Clause
|
|
|
|
License: MIT AND MIT-CMU AND GPL-2.0-or-later AND GPL-3.0-or-later AND BSD-3-Clause AND BSD-2-Clause
|
2021-05-27 13:20:28 +00:00
|
|
|
|
2015-11-17 18:35:06 +00:00
|
|
|
%description doc
|
2010-10-25 12:18:40 +00:00
|
|
|
The package contains documentation for pyparsing.
|
2023-03-15 23:13:17 +00:00
|
|
|
%endif
|
2010-10-25 12:18:40 +00:00
|
|
|
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
%prep
|
2023-11-19 17:14:40 +00:00
|
|
|
%autosetup -p1
|
2022-04-28 11:47:44 +00:00
|
|
|
|
2022-07-14 19:06:53 +00:00
|
|
|
dos2unix -k examples/*
|
|
|
|
|
2019-01-10 10:27:15 +00:00
|
|
|
|
2022-07-14 19:06:53 +00:00
|
|
|
%generate_buildrequires
|
2023-02-07 17:21:26 +00:00
|
|
|
# tox lists only the [diagrams] extra and coverage as deps, so we bypass it
|
2023-03-15 23:13:17 +00:00
|
|
|
%pyproject_buildrequires %{?with_tests:-x diagrams}
|
2023-02-07 17:20:26 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
|
|
|
|
%build
|
2022-07-14 19:06:53 +00:00
|
|
|
%pyproject_wheel
|
2005-08-03 19:08:56 +00:00
|
|
|
|
2023-03-15 23:13:17 +00:00
|
|
|
%if %{with doc}
|
2019-02-26 12:44:45 +00:00
|
|
|
pushd docs
|
|
|
|
# Theme is not available
|
|
|
|
sed -i '/alabaster/d' conf.py
|
|
|
|
sphinx-build -b html . html
|
|
|
|
popd
|
2023-03-15 23:13:17 +00:00
|
|
|
%endif
|
2023-02-07 17:20:26 +00:00
|
|
|
|
2019-01-10 10:27:15 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
%install
|
2022-07-14 19:06:53 +00:00
|
|
|
%pyproject_install
|
2023-02-07 17:20:26 +00:00
|
|
|
%pyproject_save_files pyparsing
|
2005-08-03 19:08:56 +00:00
|
|
|
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2019-01-10 10:27:15 +00:00
|
|
|
%check
|
2023-03-15 23:13:17 +00:00
|
|
|
%pyproject_check_import %{!?with_tests:-e pyparsing.diagram}
|
|
|
|
%if %{with tests}
|
2022-07-14 19:06:53 +00:00
|
|
|
%pytest -v
|
2023-03-15 23:13:17 +00:00
|
|
|
%endif
|
2019-01-10 10:27:15 +00:00
|
|
|
|
|
|
|
|
2023-02-07 17:20:26 +00:00
|
|
|
%files -n python%{python3_pkgversion}-pyparsing -f %{pyproject_files}
|
2015-11-17 18:35:06 +00:00
|
|
|
%license LICENSE
|
2019-02-26 12:44:45 +00:00
|
|
|
%doc CHANGES README.rst
|
2010-10-25 12:18:40 +00:00
|
|
|
|
2023-03-15 23:13:17 +00:00
|
|
|
%if %{with doc}
|
2010-10-25 12:18:40 +00:00
|
|
|
%files doc
|
2015-11-17 18:35:06 +00:00
|
|
|
%license LICENSE
|
2019-02-26 12:44:45 +00:00
|
|
|
%doc CHANGES README.rst docs/html examples
|
2023-03-15 23:13:17 +00:00
|
|
|
%endif
|
2019-01-10 10:27:15 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-07-14 17:42:31 +00:00
|
|
|
%autochangelog
|