## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # SCons 4.* works with Python3 >= (3,5,0) # Python2 is deprecated. # SCons 4 is not in EPEL8 because already provided by Centos8-stream, # however building this package in epel8 outside official repositories is possible with Python38. # See https://bugzilla.redhat.com/show_bug.cgi?id=1823510 %bcond_with debug # Package documentation files %if 0%{?el7} || 0%{?fedora} || 0%{?eln} %bcond_without doc %else %bcond_with doc %endif %if 0%{?el8} %global python3_sitelib %{_prefix}/lib/python3.9/site-packages %endif # Install prebuilt documentation %bcond_without prebuilt_doc Name: scons Version: 4.5.2 Release: %autorelease Summary: An Open Source software construction tool License: MIT URL: http://www.scons.org Source0: https://github.com/SCons/scons/archive/%{version}/scons-%{version}.tar.gz Source1: https://scons.org/doc/production/scons-doc-%{version}.tar.gz BuildArch: noarch BuildRequires: make %description SCons is an Open Source software construction tool--that is, a build tool; an improved substitute for the classic Make utility; a better way to build software. SCons is based on the design which won the Software Carpentry build tool design competition in August 2000. SCons "configuration files" are Python scripts, eliminating the need to learn a new build tool syntax. SCons maintains a global view of all dependencies in a tree, and can scan source (or other) files for implicit dependencies, such as files specified on #include lines. SCons uses MD5 signatures to rebuild only when the contents of a file have really changed, not just when the timestamp has been touched. SCons supports side-by-side variant builds, and is easily extended with user- defined Builder and/or Scanner objects. %if %{with doc} %package doc Summary: An Open Source software construction tool BuildArch: noarch %if 0%{without prebuilt_doc} BuildRequires: python3-sphinx >= 5.1.1 BuildRequires: python3-sphinx_rtd_theme BuildRequires: rst2pdf, fop, ghostscript BuildRequires: python3dist(readme-renderer) %endif %description doc Scons documentation. %endif %package -n python3-%{name} Summary: An Open Source software construction tool %if 0%{?el7} || 0%{?el9} || 0%{?fedora} || 0%{?eln} BuildRequires: python3-devel BuildRequires: python3-lxml BuildRequires: python3-wheel BuildRequires: python3-setuptools BuildRequires: python3-psutil BuildRequires: python3-psutil-tests BuildRequires: lynx %else BuildRequires: python39-devel BuildRequires: python39-lxml BuildRequires: python39-wheel BuildRequires: python39-setuptools BuildRequires: python39-psutil BuildRequires: lynx Provides: scons-python39 = 0:%{version}-%{release} Provides: python39-scons = 0:%{version}-%{release} %endif Provides: scons = 0:%{version}-%{release} Provides: scons-python3 = 0:%{version}-%{release} Provides: SCons = 0:%{version}-%{release} %if 0%{?el7} Obsoletes: python34-%{name} < 0:%{version}-%{release} Obsoletes: python2-%{name} < 0:%{version}-%{release} Obsoletes: python-%{name} < 0:%{version}-%{release} %endif %py_provides python3-%{name} %description -n python3-%{name} SCons is an Open Source software construction tool--that is, a build tool; an improved substitute for the classic Make utility; a better way to build software. SCons is based on the design which won the Software Carpentry build tool design competition in August 2000. SCons "configuration files" are Python scripts, eliminating the need to learn a new build tool syntax. SCons maintains a global view of all dependencies in a tree, and can scan source (or other) files for implicit dependencies, such as files specified on #include lines. SCons uses MD5 signatures to rebuild only when the contents of a file have really changed, not just when the timestamp has been touched. SCons supports side-by-side variant builds, and is easily extended with user- defined Builder and/or Scanner objects. %prep %if 0%{with prebuilt_doc} %autosetup -n %{name}-%{version} -N %setup -n %{name}-%{version} -q -T -D -a 1 cd .. %else %autosetup -N -T -b 0 cd .. %endif # Convert to UTF-8 for file in %{name}-%{version}/src/*.txt; do iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ touch -r $file $file.new && \ mv $file.new $file done %if 0%{?fedora} || 0%{?eln} %py3_shebang_fix %{name}-%{version}/scripts/scons.py %else pathfix%{python3_version}.py -i %{__python3} -pn %{name}-%{version}/scripts/scons.py %endif %if 0%{?el8} pathfix3.9.py -i %{__python3} -pn %{name}-%{version}/scripts/scons.py %endif # PREVENT MANPAGES REMOVING # See https://github.com/SCons/scons/issues/3989#issuecomment-890582380 sed -i -e 's!env.AddPostAction(tgz_file, Delete(man_pages))! !g' %{name}-%{version}/SConstruct %build %if 0%{?el7} || 0%{?el9} || 0%{?fedora} || 0%{?eln} %{__python3} scripts/scons.py \ %else %{_bindir}/python3.9 scripts/scons.py \ %endif %if %{with debug} --debug=explain \ %endif %if %{without doc} SKIP_DOC=True %endif %install export LDFLAGS="%{build_ldflags}" export CFLAGS="%{build_cflags}" %if 0%{?el7} || 0%{?el9} || 0%{?fedora} || 0%{?eln} %py3_install -- --install-scripts=%{_bindir} --install-data=%{_datadir} pushd %{buildroot}%{_bindir} for i in %{name}-3 %{name}-v%{version}-%{python3_version} %{name}-%{python3_version}; do ln -fs %{name} %{buildroot}%{_bindir}/$i done for i in %{name}ign-3 %{name}ign-v%{version}-%{python3_version} %{name}ign-%{python3_version}; do ln -fs %{name}ign %{buildroot}%{_bindir}/$i done for i in %{name}-configure-cache-3 %{name}-configure-cache-v%{version}-%{python3_version} %{name}-configure-cache-%{python3_version}; do ln -fs %{name}-configure-cache %{buildroot}%{_bindir}/$i done popd %else %{_bindir}/python3.9 setup.py install -O1 --skip-build --root %{buildroot} \ --install-scripts=%{_bindir} \ --install-data=%{_datadir} pushd %{buildroot}%{_bindir} for i in %{name}-3 %{name}-v%{version}-3.9 %{name}-3.9; do ln -fs %{name} %{buildroot}%{_bindir}/$i done for i in %{name}ign-3 %{name}ign-v%{version}-3.9 %{name}ign-3.9; do ln -fs %{name}ign %{buildroot}%{_bindir}/$i done for i in %{name}-configure-cache-3 %{name}-configure-cache-v%{version}-3.9 %{name}-configure-cache-3.9; do ln -fs %{name}-configure-cache %{buildroot}%{_bindir}/$i done popd %endif rm -rfv %{buildroot}%{_bindir}/__pycache__ # Install manpages mkdir -p %{buildroot}%{_mandir}/man1 install -pm 644 build/doc/man/*.1 %{buildroot}%{_mandir}/man1/ rm -f %{buildroot}%{_datadir}/*.1 %check %{__python3} runtest.py -P %{__python3} --passed --quit-on-failure SCons/BuilderTests.py %files -n python3-%{name} %doc CHANGES.txt RELEASE.* %license LICENSE* %{_bindir}/%{name} %{_bindir}/%{name}ign %{_bindir}/%{name}-configure-cache %{_bindir}/%{name}*-3* %{python3_sitelib}/SCons/ %{python3_sitelib}/*.egg-info/ %{_mandir}/man1/* %if %{with doc} %files doc %if 0%{without prebuilt_doc} %doc build/doc/PDF build/doc/HTML build/doc/TEXT %else %doc PDF HTML EPUB TEXT %endif %license LICENSE* %endif %changelog * Tue Mar 21 2023 Antonio Trande 4.5.2-1 - Release 4.5.2 * Tue Mar 07 2023 Antonio Trande 4.5.1-1 - Release 4.5.1 * Mon Mar 06 2023 Antonio Trande 4.5.0-1 - Release 4.5.0 * Sat Jan 21 2023 Fedora Release Engineering 4.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Nov 01 2022 Lumir Balhar 4.4.0-3 - Change location of pathfix.py * Thu Sep 01 2022 Antonio Trande 4.4.0-2 - Build documentation * Fri Aug 12 2022 Antonio Trande 4.4.0-1 - Release 4.4.0 * Sat Jul 23 2022 Fedora Release Engineering 4.3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint 4.3.0-4 - Rebuilt for Python 3.11 * Sat Jan 22 2022 Fedora Release Engineering 4.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Dec 15 2021 Antonio Trande 4.3.0-2 - Rebuild on EPEL9 * Sun Nov 28 2021 Antonio Trande 4.3.0-1 - Release 4.3.0 * Mon Aug 09 2021 Antonio Trande 4.2.0-1 - Release 4.2.0 * Fri Jul 23 2021 Fedora Release Engineering 4.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint 4.1.0-6 - Rebuilt for Python 3.10 * Sun May 23 2021 Antonio Trande 4.1.0-5 - Fix eln builds * Sun May 23 2021 Robert-André Mauchin 4.1.0-4 - Install prebuilt docs to avoid dependency on fop, affected by the Java apocalypse * Fri Apr 16 2021 Antonio Trande 4.1.0-3 - Prepare this package for epel8 + python38 * Fri Mar 05 2021 Antonio Trande <3974791-anto.trande@users.noreply.gitlab.com> 4.1.0-2 - Add Make BR * Sat Jan 30 2021 Antonio T 4.1.0-1 - Release 4.1.0 * Wed Jan 27 2021 Fedora Release Engineering 4.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jan 13 2021 Antonio T 4.0.1-4 - Patched for Python-310 (rhbz#1914318) * Mon Oct 05 2020 sagitter 4.0.1-3 - BuildRequires python3-setuptools explicitly * Wed Jul 29 2020 Fedora Release Engineering 4.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jul 17 2020 sagitter 4.0.1-1 - Release 4.0.1 * Sun Jul 12 2020 sagitter 4.0.0-1 - Release 4.0.0 * Tue May 26 2020 Miro Hrončok 3.1.2-4 - Rebuilt for Python 3.9 * Fri Feb 07 2020 sagitter 3.1.2-3 - Remove missing dependencies (fop) for building doc * Thu Jan 30 2020 Fedora Release Engineering 3.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Tue Dec 17 2019 sagitter 3.1.2-1 - Update to 3.1.2 * Fri Nov 15 2019 sagitter 3.1.1-5 - Fix Changelog * Fri Nov 15 2019 sagitter 3.1.1-4 - Python2 SCons no longer built on Fedora 32+ * Thu Oct 03 2019 Miro Hrončok 3.1.1-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Tue Aug 27 2019 Mosaab Alzoubi 3.1.1-1 - Update to 3.1.1 * Mon Aug 19 2019 Miro Hrončok 3.1.0-2 - Rebuilt for Python 3.8 * Fri Aug 16 2019 sagitter 3.1.0-1 - Release 3.1.0 * Mon Aug 12 2019 sagitter 3.0.5-5 - Provides *-3 dummy commands on Fedora and EPEL7+ * Sat Aug 03 2019 sagitter 3.0.5-4 - Remove wrong links of scons-2 * Wed Jul 24 2019 sagitter 3.0.5-3 - Fix builds on EPEL7 * Tue Jul 23 2019 sagitter 3.0.5-2 - Unversioned commands point to Python3 on Fedora| Obsolete Python2 version on Fedora * Wed Mar 27 2019 sagitter 3.0.5-1 - Release 3.0.5 * Sat Mar 23 2019 Fabian Affolter 3.0.4-5 - Update changelog (typos and style) * Thu Mar 14 2019 sagitter 3.0.4-4 - Fix Provides of scons-python3 * Thu Mar 14 2019 sagitter 3.0.4-3 - Reorganize distro macros * Sat Feb 02 2019 Fedora Release Engineering 3.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Jan 23 2019 sagitter 3.0.4-1 - Release 3.0.4 * Wed Aug 22 2018 sagitter 3.0.1-9 - Reintroduce python2-scons on fedora 30+ * Wed Aug 22 2018 sagitter 3.0.1-8 - Deprecate Python2 on fedora 30+ and epel 8+; use python3_other macros (https://fedoraproject.org/wiki/User:Bkabrda/EPEL7_Python3) * Sat Jul 21 2018 Honza Horak 3.0.1-7 - Do not build python2-scons on rhel>7 * Sat Jul 14 2018 Fedora Release Engineering 3.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok 3.0.1-5 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering 3.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Jan 23 2018 Merlin Mathesius 3.0.1-3 - Cleanup spec file conditionals * Fri Dec 29 2017 sagitter 3.0.1-2 - Provide Python2 and Python3 scons * Wed Nov 29 2017 sagitter 3.0.1-1 - Update to 3.0.1 * Tue Oct 03 2017 Fabian Affolter 3.0.0-1 - * Tue Oct 03 2017 Fabian Affolter - 2.5.1-1 - Update to new upstream version 3.0.0 (rhbz#1497891) * Thu Jul 27 2017 Fedora Release Engineering 2.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering 2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Nov 15 2016 Fabian Affolter 2.5.1-1 - * Tue Nov 15 2016 Fabian Affolter - 2.5.1-1 - Update to new upstream version 2.5.1 (rhbz#1391798) * Mon Jun 13 2016 Fabian Affolter 2.5.0-1 - * Mon Jun 13 2016 Fabian Affolter - 2.5.0-1 - Update to new upstream version 2.5.0 * Sat May 07 2016 Fabian Affolter 2.4.1-2 - RPMAUTOSPEC: unresolvable merge