## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?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 BuildArch: noarch %{?python_enable_dependency_generator} %description %_description %package -n python3-sciunit Summary: %{summary} BuildRequires: git-core BuildRequires: python3-devel %description -n python3-sciunit %_description %prep %autosetup -n sciunit-%{commit} -S git rm -rf sciunit.egg-info # 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 %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 PYTHONPATH=%{buildroot}/%{python3_sitelib} %{python3} -m sciunit.unit_test buffer %endif %files -n python3-sciunit -f %{pyproject_files} %doc README.md %{_bindir}/sciunit %changelog * 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