scons/scons.spec
Tomáš Chvátal 3a0d7f1915 Accepting request 640345 from home:mcepl:work
- Block failing tests (and block %check section completely on
  non-Intel archs, as the tests are apparently not designed for
  that).
- FIx patches from the upstream to improve compatbiilty:
    fix-jN-for-python-37.patch
    fix-rpm-tests-for-newer-rpmbuild.patch
    no_deprecated_asserts.patch
    no_time-clock.patch
    removed_splitunc.patch
    replace_TestSuite_main.patch
    stop_custom_OrderedDict.patch

OBS-URL: https://build.opensuse.org/request/show/640345
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/scons?expand=0&rev=62
2018-10-07 12:11:44 +00:00

119 lines
3.5 KiB
RPMSpec

#
# spec file for package scons
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: scons
Version: 3.0.1
Release: 0
Summary: Replacement for Make
License: MIT
Group: Development/Tools/Building
URL: http://www.scons.org/
Source0: https://github.com/SCons/%{name}/archive/%{version}.tar.gz
#http://www.scons.org/doc/%%{version}/HTML/scons-user.html
Source1: scons-user.html-%{version}.tar.bz2
# Adjust to exclude all failing tests
Source2: grep-filter-list.txt
# Upstream compatibilitt patches
Patch0: no_deprecated_asserts.patch
Patch1: removed_splitunc.patch
Patch2: fix-jN-for-python-37.patch
Patch3: replace_TestSuite_main.patch
Patch4: stop_custom_OrderedDict.patch
Patch5: no_time-clock.patch
# Specific fixes
Patch6: fix-rpm-tests-for-newer-rpmbuild.patch
# Patch7: replace-imp-with-importlib.patch
# Local modification
Patch8: scons-3.0.0-fix-install.patch
BuildRequires: grep
BuildRequires: python3-base >= 3.5
BuildRequires: python3-lxml
Requires: python3-base >= 3.5
# For tests
BuildRequires: clang
BuildRequires: docbook-xsl-pdf2index
BuildRequires: docbook5-xsl-stylesheets
BuildRequires: gcc-c++
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libxslt-tools
BuildRequires: xmlgraphics-fop
# texlive texlive-latex3 biber texmaker ghostscript
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: git
BuildRequires: libtool
BuildRequires: pcre-devel
BuildRequires: subversion
BuildRequires: swig
BuildArch: noarch
%description
SCons is a make replacement that provides a range of enhanced features,
such as automated dependency generation and built-in compilation cache
support. SCons rule sets are Python scripts, which means that SCons
provides itself as well as the features. SCons allows you to use the
full power of Python to control compilation.
%prep
%setup -q
%autopatch -p1
sed -i -e '/QT_LIBPATH = os.path.join.*QTDIR/s/lib/%{_lib}/' \
src/engine/SCons/Tool/qt.py
sed -i 's|%{_bindir}/env python|%{_bindir}/python3|' src/script/*
cp %{SOURCE2} grep-filter-list.txt
%build
python3 bootstrap.py build/scons
cd build/scons
%py3_build
%install
cd build/scons
ls -lh build/lib
%py3_install \
--standard-lib \
--no-install-bat \
--no-version-script \
--install-scripts=%{_bindir} \
--record installed_files.txt
%check
# Tests on non-Intel archs have too many failing tests
%ifarch i586 x86_64
TEMP_FILE=$(mktemp --tmpdir scons-test.XXXXXX)
trap 'rm -f -- "$TEMP_FILE"' INT TERM HUP EXIT
find src/ test/ -name \*.py \
| grep -F -v -f grep-filter-list.txt >$TEMP_FILE
python3 runtest.py -f $TEMP_FILE
%endif
%files
%license LICENSE
%doc src/CHANGES.txt README.rst src/RELEASE.txt
%{_bindir}/*
%{python3_sitelib}/SCons
%{python3_sitelib}/scons*.egg-info
%{_mandir}/man1/*%{ext_man}
%changelog