## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 12; 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 %bcond_without tests # For scidash %global scidash_commit 5d47042d3eb40abcb062ba15f90f64d4d208d433 %global scidash_shortcommit %(c=%{scidash_commit}; echo ${c:0:7}) # For sciunit # 0.2.7 wasn't tagged correctly, so use commit information # https://github.com/scidash/sciunit/issues/208 %global commit c70f3886f49ebd71bfc8d33c9821f2e40341f3ce %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global _description %{expand: A framework for validating scientific models by creating experimental-data-driven unit tests.} Name: python-sciunit Version: 0.2.7 Release: %autorelease Summary: Framework for test-driven validation of scientific models License: MIT URL: http://sciunit.io/ # For tagged releases on Github: pypi does not include docs etc. #Source0: https://github.com/scidash/sciunit/archive/v%%{version}/sciunit-%%{version}.tar.gz Source0: https://github.com/scidash/sciunit/archive/%{commit}/sciunit-%{shortcommit}.tar.gz # Required for tests # https://github.com/scidash/sciunit/blob/0.2.2/test.sh#L3 Source1: https://github.com/scidash/scidash/archive/%{scidash_commit}/scidash-%{scidash_shortcommit}.tar.gz # getargspec -> getfullargspec Patch0: https://github.com/scidash/sciunit/commit/6116e3517b792889cfe5144379a38dbf4769dfae.patch # Replace imp with importlib Patch1: https://github.com/scidash/sciunit/commit/c00b21768edbe1cd734dd1c85f967e2fde136ec3.patch BuildArch: noarch %description %_description %package -n python3-sciunit Summary: %{summary} BuildRequires: git-core BuildRequires: python3-devel # Part of sciunit/utils.py (marked by a comment) was copied from cypy in # https://github.com/scidash/sciunit/commit/28612172bf23c25a9f81ffe5578265aa8849f813. # The version is assumed; there was only a single release on PyPI at the time. # # Upstream was asked to comment per packaging guidelines: # “Statement on bundling cypy?” # https://github.com/scidash/sciunit/issues/215 Provides: bundled(python3dist(cypy)) = 0.2 %description -n python3-sciunit %_description %prep %autosetup -n sciunit-%{commit} -S git # Update requirements, our package does not provide bs4 # Remove version pins # Remove backports.tempfile, we use what's in py3 sed -i -e 's/bs4/beautifulsoup4/' -e '/backports/ d' -e 's/importlib-metadata.*/importlib-metadata/' setup.cfg sed -i -e 's/backports.tempfile/tempfile/' sciunit/utils.py # Fix for compatibility with nbconvert 7.13.0 # https://github.com/scidash/sciunit/issues/220 sed -i 's/from nbconvert.preprocessors.execute import CellExecutionError/from nbclient.exceptions import CellExecutionError/' sciunit/utils.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files sciunit %check %if %{with tests} # https://github.com/scidash/sciunit/blob/master/test.sh tar -xf %{SOURCE1} mv scidash-%{scidash_commit} ../scidash # Disable test that requires it to be a git repo by adding the necessary decorator sed -i '/def test_Versioned/i \ \ \ \ @unittest.skip' sciunit/unit_test/base_tests.py sed -i '/def test_versioned/i \ \ \ \ @unittest.skip' sciunit/unit_test/utils_tests.py # https://github.com/scidash/sciunit/issues/211 sed -i '/def test_source_check/i \ \ \ \ @unittest.skip' sciunit/unit_test/model_tests.py # Disable tests failing in Python3.12 # https://github.com/scidash/sciunit/issues/218 sed -i '/def test_testsuite/i \ \ \ \ @unittest.skip' sciunit/unit_test/test_tests.py sed -i '/def test_testsuite_set_verbose/i \ \ \ \ @unittest.skip' sciunit/unit_test/test_tests.py %{py3_test_envvars} %{python3} -m sciunit.unit_test buffer %endif %files -n python3-sciunit -f %{pyproject_files} %doc README.md %{_bindir}/sciunit %changelog * Tue Dec 19 2023 Lumir Balhar - 0.2.7-12 - Compatibility with nbconvert 7.13.0 * Fri Oct 13 2023 Benjamin A. Beasley - 0.2.7-11 - F38+: Use %%{py3_test_envvars} to set up test environment * Tue Sep 05 2023 Sandro - 0.2.7-10 - Get rid of da (l)imp - Apply upstream pacth replacing `imp` with `importlib` - Disable failing tests (reported upstream) - Close RHBZ#2220493 and RHBZ#2226540 * Fri Jul 21 2023 Fedora Release Engineering - 0.2.7-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed May 24 2023 Benjamin A. Beasley - 0.2.7-8 - Document cypy bundling * Wed May 24 2023 Benjamin A. Beasley - 0.2.7-7 - Remove some obsolete details from the spec file - Don’t use a macro form of “tar” - No need to manually enable the Python run-time dependency generator - No need to remove upstream egg-info when using pyproject-rpm-macros * Fri Jan 20 2023 Fedora Release Engineering - 0.2.7-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.2.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jul 04 2022 Ankur Sinha (Ankur Sinha Gmail) - 0.2.7-4 - feat: use pyproject macros * Mon Jul 04 2022 Ankur Sinha (Ankur Sinha Gmail) - 0.2.7-3 - feat: fix build * Wed Jun 15 2022 Python Maint - 0.2.2.2-9 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.2.2.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.2.2.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.2.2.2-6 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.2.2.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.2.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jun 25 2020 Ankur Sinha - 0.2.2.2-3 - Explicitly BR setuptools * Tue May 26 2020 Miro Hrončok - 0.2.2.2-2 - Rebuilt for Python 3.9 * Fri May 22 2020 Ankur Sinha - 0.2.2.2-1 - Update to new release - Includes fix for py3.9 - https://bugzilla.redhat.com/show_bug.cgi?id=1838486 * Thu May 07 2020 Ankur Sinha - 0.2.2-1 - Update as per review comments #1827957 - Remove extra provides - Improve description for doc sub package * Sat Apr 25 2020 Ankur Sinha - 0.2.2-1 - Initial build