## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 17; 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 Name: python-pybids Version: 0.15.5 Release: %autorelease Summary: Interface with datasets conforming to BIDS # The entire source is MIT, except: # - The bundled single-file versioneer.py (from python-versioneer), version # 0.20, is CC0-1.0. While this license is approved for content only, this # file falls under an exception # (https://gitlab.com/fedora/legal/fedora-license-data/-/issues/91#note_1151947383): # # Existing uses of CC0-1.0 on code files in Fedora packages prior to # 2022-08-01, and subsequent upstream versions of those files in those # packages, continue to be allowed. We encourage Fedora package # maintainers to ask upstreams to relicense such files. # # More recent versions of python-versioneer are Unlicense, so this may # change if upstream updates the bundled versioneer.py. # # The bundled versioneer.py is not packaged, so we do not treat it as a # bundled library; however, the generated _version.py falls under the same # license, so CC0-1.0 still appears in the license of the subpackage that # contains it. # - We presume other test datasets (bids/tests/data/*/) are under the overall # MIT license, unless evidence to the contrary comes to light. # # In the python3-pybids+test subpackage: # - The following test datasets (content) are PDDL-1.0: # bids/tests/data/ds005/ # bids/tests/data/ds005_conflict/ # # We refrain from including the bids-examples/ submodule # (https://github.com/bids-standard/bids-examples/) because many of the # datasets therein have unspecified licenses. A small number of tests are # skipped as a result. License: MIT AND CC0-1.0 URL: https://bids.neuroimaging.io Source0: https://github.com/bids-standard/pybids/archive/%{version}/pybids-%{version}.tar.gz BuildArch: noarch # tests fail on 32 bit systems, plus: # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} %global _description %{expand: PyBIDS is a Python library to centralize interactions with datasets conforming BIDS (Brain Imaging Data Structure) format. For more information about BIDS visit https://bids.neuroimaging.io.} %description %{_description} %pyproject_extras_subpkg -n python3-pybids plotting plottings %package -n python3-pybids Summary: Interface with datasets conforming to BIDS BuildRequires: python3-devel Obsoletes: python-pybids-doc < 0.15.5-13 # unbundled BuildRequires: %{py3_dist inflect} Requires: %{py3_dist inflect} # Allows running tests in parallel: BuildRequires: %{py3_dist pytest-xdist} %description -n python3-pybids %{_description} %package -n python3-pybids+test %global test_summary Tests and test extras for PyBIDS Summary: %{test_summary} # See comment above base package License tag for licensing breakdown. # # The CC0-1.0 file _version.py does not appear in this subpackage. License: MIT AND PDDL-1.0 Requires: python3-pybids = %{version}-%{release} %global test_description %{expand: \ These are the tests for python3-pybids. This package: • Provides the “bids.tests” package • Makes sure the “test” extra dependencies are installed} %description -n python3-pybids+test %{test_description} # Upstream duplicates all extras with singular and plural names. # Based loosely on: rpm -E '%%pyproject_extras_subpkg -n python3-pybids tests' %package -n python3-pybids+tests Summary: %{test_summary} # This has no files of its own, so none of the non-MIT licenses apply. License: MIT # This metapackage is basically an alias for python3-pybids+test. We build it # as a separate subpackage rather than adding a virtual Provides so that we can # benefit from generators to add Provides like python3dist(pybids[tests]). Requires: python3-pybids+test = %{version}-%{release} %description -n python3-pybids+tests %{test_description} %prep %autosetup -n pybids-%{version} # Remove bundled inflect rm -rf bids/external sed -r -i.backup 's/from.*external (import)/\1/' bids/layout/layout.py # unpin formulaic requirement # https://github.com/bids-standard/pybids/issues/915 # https://github.com/bids-standard/pybids/pull/916 sed -i 's/formulaic.*/formulaic/' setup.cfg # Not yet packaged: python-bsmschema # https://bugzilla.redhat.com/show_bug.cgi?id=2191661 sed -r -i 's/^([[:blank:]]*)(bsmschema)\b/\1; \2/' setup.cfg # Remove bogus executable bits for non-script files find bids doc -type f -perm /0111 -execdir chmod -v a-x '{}' '+' %generate_buildrequires %pyproject_buildrequires -x test,tests,plotting,plottings %build %pyproject_wheel %install %pyproject_install %pyproject_save_files bids %check %if %{with tests} %pytest -n auto -v %else %pyproject_check_import %endif %files -n python3-pybids -f %{pyproject_files} %doc README.md %{_bindir}/pybids %exclude %{python3_sitelib}/bids/tests/ %files -n python3-pybids+test %{python3_sitelib}/bids/tests/ %ghost %{python3_sitelib}/*.dist-info %files -n python3-pybids+tests %ghost %{python3_sitelib}/*.dist-info %changelog * Sun Apr 30 2023 Benjamin A. Beasley 0.15.5-17 - Add review link for python-bsmschema * Sun Apr 30 2023 Benjamin A. Beasley 0.15.5-16 - Split tests into a subpackage * Sun Apr 30 2023 Benjamin A. Beasley 0.15.5-15 - Update License to SPDX * Sun Apr 30 2023 Benjamin A. Beasley 0.15.5-14 - Remove bogus executable bits for non-script files * Sun Apr 30 2023 Benjamin A. Beasley 0.15.5-13 - Simplify inflect unbundling * Sun Apr 30 2023 Benjamin A. Beasley 0.15.5-12 - Stop using or packaging the bids-examples submodule * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-11 - Run tests in parallel * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-10 - Add plotting/plottings metapackages * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-9 - Reference Changes/EncourageI686LeafRemoval * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-8 - Update description from upstream * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-7 - Use two lines between spec file sections * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-6 - Fix the description in the -doc subpackage * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-5 - Use generated BR’s for tests * Fri Apr 28 2023 Benjamin A. Beasley 0.15.5-4 - Reference examples submodule by commit * Fri Jan 20 2023 Fedora Release Engineering 0.15.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Nov 10 2022 Ankur Sinha (Ankur Sinha Gmail) 0.15.5-2 - chore: drop i686 support (tests fail) * Thu Nov 10 2022 Ankur Sinha (Ankur Sinha Gmail) 0.15.5-1 - feat: update to 0.15.5 (fix rhbz#1996270, fix rhbz#2113646) - drops doc generation - enables all tests by default - updates to use pyproject rpm macros * Fri Jul 22 2022 Fedora Release Engineering - 0.13.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jul 11 2022 Benjamin A. Beasley - 0.13.1-5 - Fix extra newline in description - Drop unnecessary python_enable_dependency_generator macro - Switch URL to HTTPS * Fri Jan 21 2022 Fedora Release Engineering - 0.13.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.13.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.13.1-2 - Rebuilt for Python 3.10 * Sat May 22 2021 Ankur Sinha - 0.13.1-1 - Update to latest release * Wed Jan 27 2021 Fedora Release Engineering - 0.12.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Nov 28 2020 Ankur Sinha - 0.12.4-1 - Update to 0.12.4 * Sun Sep 13 2020 Ankur Sinha - 0.12.1-1 - Update to new release * Fri Sep 04 2020 Ankur Sinha - 0.12.0-1 - Update to 0.12.0 * Wed Jul 29 2020 Fedora Release Engineering - 0.10.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.10.2-2 - Rebuilt for Python 3.9 * Tue Apr 21 2020 Ankur Sinha - 0.10.2-1 - Update to 0.10.2 * Thu Jan 30 2020 Fedora Release Engineering - 0.10.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Dec 12 2019 Aniket Pradhan - 0.10.0-1 - Bumped to v0.10.0 * Tue Oct 1 2019 Aniket Pradhan - 0.9.4-1 - Bumped to v0.9.4 * Thu Aug 22 2019 Aniket Pradhan - 0.9.3-1 - Bumped to v0.9.3 * Mon Aug 19 2019 Miro Hrončok - 0.9.1-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 0.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon May 27 2019 Ankur Sinha - 0.9.1-1 - Update to 0.9.1 * Mon Apr 08 2019 Ankur Sinha - 0.8.0-1 - Update the latest release - Drop dropped grabbit dep - Add new BR: python-bids-validator: requires review: 1697498 - Unbundle new bundled libs * Sat Feb 02 2019 Fedora Release Engineering - 0.6.5-3.gite35ced6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Nov 12 2018 Ankur Sinha - 0.6.5-2.gite35ced6 - Use bconds * Wed Nov 07 2018 Ankur Sinha - 0.6.5-1.gite35ced6 - Use latest git snapshot that fixes tests - Add documentation and examples in subpackage * Wed Nov 07 2018 Ankur Sinha - 0.6.3-2 - Enable tests now that duecredit is available in rawhide - Disable py2 build since python-nibabel is only py3 even in F29 * Fri Jul 20 2018 Ankur Sinha - 0.6.3-1 - Update to latest release - Use py.test - Disable tests until nibabel is fixed * Mon Jan 15 2018 Ankur Sinha - 0.4.2-2 - Use github source for license and test suite - Fix requires and build requires * Fri Jan 12 2018 Ankur Sinha - 0.4.2-1 - Initial build