scons/scons.spec

140 lines
3.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package scons
#
Accepting request 760733 from home:mcepl:branches:devel:tools:building - Switch off tests - Update to 3.1.2: - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - Fix suncxx tool (Oracle Studio compiler) when using Python 3. Previously would throw an exception. Resolved by properly handling tool version string output as unicode. - Resolved a typo in engine.SCons.Tool - Resolved a race condition in multithreaded Windows builds with Python 2 in the case where a child process is spawned while a Python action has a file open. Original author: Ryan Beasley. - Added memoization support for calls to Environment.Value() in order to improve performance of repeated calls. - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. This makes Command act more like a one-off builder. - Added support for "-imacros" to ParseFlags - Fix CheckFunc detection code for Visual 2019. Some functions (e.g. memmove) were incorrectly recognized as not available. - Fix stacktrace when using SCons with Python 3.5+ and SunOS/Solaris related tools. - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when the fontenc package is included with \usepackage[T1]{fontenc}) is read. - Improved threading performance by ensuring NodeInfo is shared across threads. Results in ~13% improvement for parallel builds (-j# > 1) with many shared nodes. OBS-URL: https://build.opensuse.org/request/show/760733 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/scons?expand=0&rev=86
2020-01-05 08:57:21 +01:00
# Copyright (c) 2020 SUSE LLC
#
# 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/
#
%define modname scons
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: scons%{psuffix}
Accepting request 760733 from home:mcepl:branches:devel:tools:building - Switch off tests - Update to 3.1.2: - Added debug option "action_timestamps" which outputs to stdout the absolute start and end time for each target. - Fix suncxx tool (Oracle Studio compiler) when using Python 3. Previously would throw an exception. Resolved by properly handling tool version string output as unicode. - Resolved a typo in engine.SCons.Tool - Resolved a race condition in multithreaded Windows builds with Python 2 in the case where a child process is spawned while a Python action has a file open. Original author: Ryan Beasley. - Added memoization support for calls to Environment.Value() in order to improve performance of repeated calls. - Update Command() function to accept target_scanner, source_factory, and target_factory arguments. This makes Command act more like a one-off builder. - Added support for "-imacros" to ParseFlags - Fix CheckFunc detection code for Visual 2019. Some functions (e.g. memmove) were incorrectly recognized as not available. - Fix stacktrace when using SCons with Python 3.5+ and SunOS/Solaris related tools. - Avoid crash with UnicodeDecodeError on Python 3 when a Latex log file in non-UTF-8 encoding (e.g. containing umlauts in Latin-1 encoding when the fontenc package is included with \usepackage[T1]{fontenc}) is read. - Improved threading performance by ensuring NodeInfo is shared across threads. Results in ~13% improvement for parallel builds (-j# > 1) with many shared nodes. OBS-URL: https://build.opensuse.org/request/show/760733 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/scons?expand=0&rev=86
2020-01-05 08:57:21 +01:00
Version: 3.1.2
Release: 0
Summary: Replacement for Make
License: MIT
Group: Development/Tools/Building
URL: https://www.scons.org/
Source0: http://prdownloads.sourceforge.net/scons/%{modname}-src-%{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
# Local modification
Patch8: scons-3.0.0-fix-install.patch
BuildRequires: fdupes
BuildRequires: grep
BuildRequires: python3-base >= 3.5
BuildRequires: python3-lxml
BuildRequires: python3-setuptools
Requires: python3-base >= 3.5
%if %{with test}
# texlive texlive-latex3 biber texmaker ghostscript
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
# For tests
BuildRequires: clang
BuildRequires: docbook-xsl-pdf2index
BuildRequires: docbook5-xsl-stylesheets
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libxslt-tools
BuildRequires: pcre-devel
BuildRequires: subversion
BuildRequires: swig
BuildRequires: xmlgraphics-fop
%endif
%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 -n %{modname}-src-%{version} -a1
%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
chmod -x src/CHANGES.txt README.rst src/RELEASE.txt
# the test is marked skipped but fails; and all are windows based so
# we can safely ignore them
rm -r test/MSVC/
rm -r test/MSVS/
rm -r test/Win32/
rm test/fixture/no_msvc/no_regs_sconstruct.py
rm test/fixture/no_msvc/no_msvcs_sconstruct.py
rm test/LEX/live_mingw.py
rm test/Decider/MD5-winonly-firstbuild.py
%build
python3 bootstrap.py build/scons
cd build/scons
%python3_build
%install
%if !%{with test}
cd build/scons
ls -lh build/lib
%python3_install \
--standard-lib \
--no-install-bat \
--no-version-script \
--install-scripts=%{_bindir} \
--record installed_files.txt
%fdupes %{buildroot}%{python3_sitelib}
%endif
%check
%if %{with test}
%ifnarch aarch64 armv7l ppc64 ppc64le s390x
TEMP_FILE=$(mktemp --tmpdir %{modname}-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
%else
echo "Skiping tests on this architecture due to failures"
%endif
%endif
%if !%{with test}
%files
%license LICENSE
%doc src/CHANGES.txt README.rst src/RELEASE.txt
%doc scons-user.html
%{_bindir}/*
%{python3_sitelib}/SCons
%{python3_sitelib}/%{modname}*.egg-info
%{_mandir}/man1/*%{ext_man}
%endif
%changelog