# Source0-md5: -
URL: -
# remove BR: python-devel for 'noarch' packages.
-BuildRequires: python-devel
-BuildRequires: python-distribute
BuildRequires: rpm-pythonprov
# if py_postclean is used
BuildRequires: rpmbuild(macros) >= 1.219
# when using /usr/bin/env or other in-place substitutions
#BuildRequires: sed >= 4.0
-# when python3 present
+%if %{with python2}
+BuildRequires: python-devel
+BuildRequires: python-distribute
+%endif
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-distribute
%{__python} setup.py \
build --build-base build-2 \
install --skip-build \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
%py_postclean
%endif
%{__python3} setup.py \
build --build-base build-3 \
install --skip-build \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
%endif
# in case there are examples provided