| |
@@ -1,11 +1,7 @@
|
| |
%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
|
| |
+ # when bootstrapping Python 3, pyparsing needs to be rebuilt before dependency generator and pip is available
|
| |
+ %bcond bootstrap 0
|
| |
|
| |
|
| |
Summary: Python package with an object-oriented approach to text processing
|
| |
@@ -19,19 +15,16 @@
|
| |
|
| |
BuildArch: noarch
|
| |
BuildRequires: dos2unix
|
| |
+ BuildRequires: unzip
|
| |
BuildRequires: python%{python3_pkgversion}-devel
|
| |
- BuildRequires: python%{python3_pkgversion}-setuptools
|
| |
+ BuildRequires: python%{python3_pkgversion}-flit-core
|
| |
|
| |
%if %{without bootstrap}
|
| |
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
|
| |
+ %endif
|
| |
|
| |
%description
|
| |
pyparsing is a module that can be used to easily and directly configure syntax
|
| |
@@ -76,19 +69,16 @@
|
| |
dos2unix -k examples/*
|
| |
|
| |
|
| |
- %if 0%{?build_wheel}
|
| |
+ %if %{without bootstrap}
|
| |
%generate_buildrequires
|
| |
%pyproject_buildrequires -t
|
| |
%endif
|
| |
|
| |
%build
|
| |
- %if 0%{?build_wheel}
|
| |
- %pyproject_wheel
|
| |
+ %if %{with bootstrap}
|
| |
+ %{python3} -m flit_core.wheel
|
| |
%else
|
| |
- %py3_build
|
| |
- %endif
|
| |
-
|
| |
- %if %{without bootstrap}
|
| |
+ %pyproject_wheel
|
| |
# build docs
|
| |
pushd docs
|
| |
# Theme is not available
|
| |
@@ -98,15 +88,18 @@
|
| |
%endif
|
| |
|
| |
%install
|
| |
- %if 0%{?build_wheel}
|
| |
- %pyproject_install
|
| |
+ %if %{with bootstrap}
|
| |
+ mkdir -p %{buildroot}%{python3_sitelib}
|
| |
+ unzip dist/pyparsing-%{version}-py3-none-any.whl -d %{buildroot}%{python3_sitelib} -x pyparsing-%{version}.dist-info/RECORD
|
| |
%else
|
| |
- %py3_install
|
| |
+ %pyproject_install
|
| |
%endif
|
| |
|
| |
|
| |
+ %if %{without bootstrap}
|
| |
%check
|
| |
%pytest -v
|
| |
+ %endif
|
| |
|
| |
|
| |
%files -n python%{python3_pkgversion}-pyparsing
|
| |
Side note: I've noticed %srcname is only used in %python_provide. Let's remove both (in a separate commit)?