2016-02-15 12:17:09 +00:00
|
|
|
%global srcname pyparsing
|
2005-08-03 19:08:56 +00:00
|
|
|
|
2022-07-14 19:06:53 +00:00
|
|
|
# when bootstrapping Python 3, pyparsing needs to be rebuilt before dependency generator is available
|
2021-02-24 16:03:49 +00:00
|
|
|
%bcond_with bootstrap
|
|
|
|
%if %{without bootstrap}
|
2017-02-15 12:54:23 +00:00
|
|
|
%global build_wheel 1
|
2019-09-02 09:31:01 +00:00
|
|
|
%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
|
2021-02-24 16:03:49 +00:00
|
|
|
%endif
|
2017-02-15 12:54:23 +00:00
|
|
|
|
2019-08-14 21:21:56 +00:00
|
|
|
|
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
|
2022-07-14 19:06:53 +00:00
|
|
|
Version: 3.0.9
|
2022-07-14 17:42:31 +00:00
|
|
|
Release: %autorelease
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
License: MIT
|
2019-01-10 10:27:15 +00:00
|
|
|
URL: https://github.com/pyparsing/pyparsing
|
|
|
|
Source0: https://github.com/%{name}/%{name}/archive/%{name}_%{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
|
2020-09-07 10:07:21 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
2019-08-14 21:21:56 +00:00
|
|
|
|
2021-02-24 16:03:49 +00:00
|
|
|
%if %{without bootstrap}
|
2020-09-07 10:07:21 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
2019-08-14 21:21:56 +00:00
|
|
|
%endif
|
2016-02-15 12:17:09 +00:00
|
|
|
|
2017-02-15 12:54:23 +00:00
|
|
|
%if 0%{?build_wheel}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pip
|
|
|
|
BuildRequires: python%{python3_pkgversion}-wheel
|
|
|
|
%endif
|
|
|
|
|
2022-07-14 19:06:53 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
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}
|
|
|
|
%if %{with bootstrap}
|
|
|
|
Provides: python%{python3_pkgversion}dist(pyparsing) = %{version}
|
|
|
|
Provides: python%{python3_version}dist(pyparsing) = %{version}
|
|
|
|
Requires: python(abi) = %{python3_version}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
|
2021-02-24 16:03:49 +00:00
|
|
|
%if %{without bootstrap}
|
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
|
|
|
|
# pymicko.py is under GPLv3+
|
|
|
|
# snmp_api.h is under CMU-UC (MIT)
|
|
|
|
# sparser.py is under GPLv2+
|
|
|
|
# searchparser.py is under BSD (3-clause, with advertising)
|
|
|
|
# btpyparse.py is under "Simplified BSD license"
|
|
|
|
License: MIT and GPLv2+ and GPLv3+ and BSD
|
|
|
|
|
2015-11-17 18:35:06 +00:00
|
|
|
%description doc
|
2010-10-25 12:18:40 +00:00
|
|
|
The package contains documentation for pyparsing.
|
2019-08-14 21:21:56 +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
|
2022-04-28 11:47:44 +00:00
|
|
|
%autosetup -p1 -n %{name}-%{name}_%{version}
|
|
|
|
|
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
|
|
|
%if 0%{?build_wheel}
|
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires -t
|
|
|
|
%endif
|
2005-08-03 19:08:56 +00:00
|
|
|
|
|
|
|
%build
|
2017-02-15 12:54:23 +00:00
|
|
|
%if 0%{?build_wheel}
|
2022-07-14 19:06:53 +00:00
|
|
|
%pyproject_wheel
|
2017-02-15 12:54:23 +00:00
|
|
|
%else
|
2016-02-15 12:17:09 +00:00
|
|
|
%py3_build
|
2017-02-15 12:54:23 +00:00
|
|
|
%endif
|
2005-08-03 19:08:56 +00:00
|
|
|
|
2021-02-24 16:03:49 +00:00
|
|
|
%if %{without bootstrap}
|
2019-01-10 10:27:15 +00:00
|
|
|
# build docs
|
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
|
2019-08-14 21:21:56 +00:00
|
|
|
%endif
|
2019-01-10 10:27:15 +00:00
|
|
|
|
2005-08-03 19:08:56 +00:00
|
|
|
%install
|
2017-02-15 12:54:23 +00:00
|
|
|
%if 0%{?build_wheel}
|
2022-07-14 19:06:53 +00:00
|
|
|
%pyproject_install
|
2017-02-15 12:54:23 +00:00
|
|
|
%else
|
2016-02-15 12:17:09 +00:00
|
|
|
%py3_install
|
2017-02-15 12:54:23 +00:00
|
|
|
%endif
|
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
|
2022-07-14 19:06:53 +00:00
|
|
|
%pytest -v
|
2019-01-10 10:27:15 +00:00
|
|
|
|
|
|
|
|
2020-09-07 10:07:21 +00:00
|
|
|
%files -n python%{python3_pkgversion}-pyparsing
|
2015-11-17 18:35:06 +00:00
|
|
|
%license LICENSE
|
2019-02-26 12:44:45 +00:00
|
|
|
%doc CHANGES README.rst
|
2022-07-14 19:06:53 +00:00
|
|
|
%{python3_sitelib}/pyparsing/
|
|
|
|
%{python3_sitelib}/pyparsing-%{version}.dist-info/
|
2010-10-25 12:18:40 +00:00
|
|
|
|
2021-02-24 16:03:49 +00:00
|
|
|
%if %{without bootstrap}
|
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
|
2019-08-14 21:21:56 +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
|