Drop the bootstrap bcond

It was not working with pyparsing 3.0.9+ and is no longer needed with packaging 22.0+
This commit is contained in:
Miro Hrončok 2023-02-07 18:20:26 +01:00
parent 16637ccb4c
commit fb214d636f

View File

@ -1,13 +1,5 @@
%global srcname pyparsing %global srcname pyparsing
# when bootstrapping Python 3, pyparsing needs to be rebuilt before dependency generator is available
%bcond_with bootstrap
%if %{without bootstrap}
%global build_wheel 1
%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
%endif
Summary: Python package with an object-oriented approach to text processing Summary: Python package with an object-oriented approach to text processing
Name: pyparsing Name: pyparsing
Version: 3.0.9 Version: 3.0.9
@ -20,17 +12,7 @@ Source0: https://github.com/%{name}/%{name}/archive/%{name}_%{version}/%{
BuildArch: noarch BuildArch: noarch
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%if %{without bootstrap}
BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx
%endif
%if 0%{?build_wheel}
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-wheel
%endif
BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pytest
%description %description
@ -40,12 +22,6 @@ definitions for any number of text parsing applications.
%package -n python%{python3_pkgversion}-pyparsing %package -n python%{python3_pkgversion}-pyparsing
Summary: %{summary} 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}} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-pyparsing %description -n python%{python3_pkgversion}-pyparsing
@ -53,7 +29,6 @@ pyparsing is a module that can be used to easily and directly configure syntax
definitions for any number of text parsing applications. definitions for any number of text parsing applications.
%if %{without bootstrap}
%package doc %package doc
Summary: Documentation for %{name} Summary: Documentation for %{name}
@ -67,7 +42,6 @@ License: MIT and GPLv2+ and GPLv3+ and BSD
%description doc %description doc
The package contains documentation for pyparsing. The package contains documentation for pyparsing.
%endif
%prep %prep
@ -76,50 +50,37 @@ The package contains documentation for pyparsing.
dos2unix -k examples/* dos2unix -k examples/*
%if 0%{?build_wheel}
%generate_buildrequires %generate_buildrequires
%pyproject_buildrequires -t %pyproject_buildrequires -t
%endif
%build %build
%if 0%{?build_wheel}
%pyproject_wheel %pyproject_wheel
%else
%py3_build
%endif
%if %{without bootstrap}
# build docs # build docs
pushd docs pushd docs
# Theme is not available # Theme is not available
sed -i '/alabaster/d' conf.py sed -i '/alabaster/d' conf.py
sphinx-build -b html . html sphinx-build -b html . html
popd popd
%endif
%install %install
%if 0%{?build_wheel}
%pyproject_install %pyproject_install
%else %pyproject_save_files pyparsing
%py3_install
%endif
%check %check
%pytest -v %pytest -v
%files -n python%{python3_pkgversion}-pyparsing %files -n python%{python3_pkgversion}-pyparsing -f %{pyproject_files}
%license LICENSE %license LICENSE
%doc CHANGES README.rst %doc CHANGES README.rst
%{python3_sitelib}/pyparsing/
%{python3_sitelib}/pyparsing-%{version}.dist-info/
%if %{without bootstrap}
%files doc %files doc
%license LICENSE %license LICENSE
%doc CHANGES README.rst docs/html examples %doc CHANGES README.rst docs/html examples
%endif
%changelog %changelog