# This package is usable both as a library and as a command-line tool. Upstream # seems to consider the command-line tool to be the primary interface, so we # use application naming guidelines. Name: spec2nii Version: 0.8.2 Release: %autorelease Summary: Multi-format in vivo MR spectroscopy conversion to NIFTI # The entire source is BSD-3-Clause. # # Per spec2nii/GE/VESPA_LICENSE, “elements of ge_pfile.py, ge_read_pfile.py and # ge_hdr_fields.py are taken from or adapted from the VESPA project” under a # license which is also BSD-3-Clause. From LICENSE: # # This software includes third party open source software components from the # VESPA project. These software components have their own license. Please see # ./spec2nii/GE/VESPA_LICENSE. # # Per LICENSE, other code is adapted from nmrglue, also under a BSD-3-Clause # license: # This software includes third party open source software from the nmrglue # project. These software components have their own license which is # reproduced here and in the relevant source code files # (spec2nii/fileiobase.py and spec2nii/varian.py). License: BSD-3-Clause URL: https://github.com/wtclarke/spec2nii Source: %{pypi_source spec2nii} # Man pages hand-written for Fedora in groff_man(7) format based on --help Source100: spec2nii.1 Source101: spec2nii-auto.1 Source102: spec2nii-twix.1 Source103: spec2nii-dicom.1 Source104: spec2nii-rda.1 Source105: spec2nii-uih.1 Source106: spec2nii-philips.1 Source107: spec2nii-philips_dl.1 Source108: spec2nii-philips_dcm.1 Source109: spec2nii-ge.1 Source110: spec2nii-text.1 Source111: spec2nii-jmrui.1 Source112: spec2nii-raw.1 Source113: spec2nii-bruker.1 Source114: spec2nii-varian.1 Source115: spec2nii-anon.1 Source116: spec2nii-dump.1 Source117: spec2nii-extract.1 Source118: spec2nii-insert.1 BuildArch: noarch # Per spec2nii/GE/VESPA_LICENSE, “elements of ge_pfile.py, ge_read_pfile.py and # ge_hdr_fields.py are taken from or adapted from the VESPA project.” # Similarly, per LICENSE, “This software includes third party open source # software from the nmrglue project.” We assess that neither case of selective # copying and adaptation rises to the level of a bundled dependency. BuildRequires: python3-devel %py_provides python3-spec2nii %description A program for multi-format conversion of in vivo MRS to the NIfTI-MRS format (https://github.com/wexeee/mrs_nifti_standard). This program was inspired by the imaging DICOM to NIfTI converter dcm2niix, developed by Chris Rorden. All MRS(I) orientations are tested with images converted using dcm2niix. %prep %autosetup # Upstream pins scipy to a particular minor release. We cannot respect this. # (Currently, our scipy is older than the pinned one, so we cannot convert it # to a lower-bound, either.) sed -r -i 's/(scipy)==.*/\1/' requirements.yml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l spec2nii install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \ '%{SOURCE100}' '%{SOURCE101}' '%{SOURCE102}' '%{SOURCE103}' \ '%{SOURCE104}' '%{SOURCE105}' '%{SOURCE106}' '%{SOURCE107}' \ '%{SOURCE108}' '%{SOURCE109}' '%{SOURCE110}' '%{SOURCE111}' \ '%{SOURCE112}' '%{SOURCE113}' '%{SOURCE114}' '%{SOURCE115}' \ '%{SOURCE116}' '%{SOURCE117}' '%{SOURCE118}' %check %pyproject_check_import %if %{with tests} %pytest %endif %files -f %{pyproject_files} %{_bindir}/spec2nii %{_mandir}/man1/spec2nii.1* %{_mandir}/man1/spec2nii-*.1* %changelog %autochangelog