Accepting request 538655 from home:pluskalm:branches:devel:tools:building

- Switch to python3

OBS-URL: https://build.opensuse.org/request/show/538655
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/scons?expand=0&rev=50
This commit is contained in:
Tomáš Chvátal 2017-11-03 11:34:01 +00:00 committed by Git OBS Bridge
parent 9f4f0f0277
commit 1a0a443ae6
2 changed files with 11 additions and 23 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Nov 3 11:22:45 UTC 2017 - mpluskal@suse.com
- Switch to python3
-------------------------------------------------------------------
Wed Oct 4 19:09:07 UTC 2017 - astieger@suse.com

View File

@ -16,11 +16,6 @@
#
# Potential build fix for SLE11 SLE11SP1
%if 0%{?suse_version} <= 1120
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: scons
Version: 3.0.0
Release: 0
@ -35,14 +30,8 @@ Source1: scons-user.html-%{version}.tar.bz2
Patch0: %{name}-3.0.0-fix-install.patch
Patch1: scons-3.0.0-support-python-2-prints.patch
BuildRequires: fdupes
BuildRequires: python-devel >= 2.7
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
BuildRequires: python3-devel >= 3.5
BuildArch: noarch
%endif
%if 0%{?suse_version} >= 1110
%py_requires
%endif
%description
SCons is a make replacement that provides a range of enhanced features,
@ -65,26 +54,20 @@ patch -p0 <<EOF
+ QT_LIBPATH = os.path.join('\$QTDIR', '%{_lib}'),
EOF
sed -i 's|%{_bindir}/env python|%{_bindir}/python|' script/*
sed -i 's|%{_bindir}/env python|%{_bindir}/python3|' script/*
%build
export CFLAGS="%{optflags}"
python setup.py build
%python3_build
%install
python setup.py \install \
--prefix=%{_prefix} \
--root=%{buildroot} \
--install-lib=%{python_sitelib} \
--no-version-script
%python3_install
%fdupes %{buildroot}%{_bindir}
%files
%defattr(-,root,root)
%doc CHANGES.txt LICENSE.txt README.txt RELEASE.txt scons-user.html
%{_bindir}/*
%{python_sitelib}/SCons/
%{python_sitelib}/*.egg-info
%{_mandir}/man1/*.gz
%{_libexecdir}/scons-%{version}
%{_mandir}/man1/*%{ext_man}
%changelog