Define a buildrequire_extras %bcond for bootstrapping
This commit is contained in:
parent
8cd3405121
commit
9c1438f59e
|
@ -21,6 +21,16 @@ BuildRequires: libxml2-devel
|
||||||
BuildRequires: libxslt-devel
|
BuildRequires: libxslt-devel
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
|
# It is a good idea to BuildRequire the runtime requirements of the [extras] we build.
|
||||||
|
# That way, we ensure all the [extras] we build are installable,
|
||||||
|
# and we possibly run tests that would otherwise be skipped.
|
||||||
|
# However, some of the extras here create a dependency loop.
|
||||||
|
# - [cssselect] Requires cssselect BuildRequires lxml
|
||||||
|
# - [html5] Requires html5lib BuildRequires lxml
|
||||||
|
# - [htmlsoup] Requires beautifulsoup4 Requires lxml
|
||||||
|
# Hence we provide a bcond to disable this buildtime requirement.
|
||||||
|
%bcond buildrequire_extras 1
|
||||||
|
|
||||||
%global _description \
|
%global _description \
|
||||||
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It\
|
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It\
|
||||||
provides safe and convenient access to these libraries using the ElementTree It\
|
provides safe and convenient access to these libraries using the ElementTree It\
|
||||||
|
@ -45,7 +55,7 @@ Python 3 version.
|
||||||
%autosetup -n lxml-%{version} -p1
|
%autosetup -n lxml-%{version} -p1
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -x source,cssselect,html5,htmlsoup
|
%pyproject_buildrequires -x source%{?with_buildrequire_extras:,cssselect,html5,htmlsoup}
|
||||||
# Remove pregenerated Cython C sources
|
# Remove pregenerated Cython C sources
|
||||||
# We need to do this after %%pyproject_buildrequires because setup.py errors
|
# We need to do this after %%pyproject_buildrequires because setup.py errors
|
||||||
# without Cython and without the .c files.
|
# without Cython and without the .c files.
|
||||||
|
|
Loading…
Reference in New Issue