]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
py2/py3 br update
authorElan Ruusamäe <glen@delfi.ee>
Wed, 15 Jan 2014 16:47:16 +0000 (18:47 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 15 Jan 2014 16:47:16 +0000 (18:47 +0200)
python.spec

index 575c9c8b59305f4386e6f5914e93d8830e93ee8f..4892047049f33a2bef26452b48796a87920f4daa 100644 (file)
@@ -17,14 +17,15 @@ Source0:    %{name}-%{version}.tar.gz
 # 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
@@ -93,8 +94,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__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
@@ -103,8 +104,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__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
This page took 0.556272 seconds and 4 git commands to generate.