2f69bd2
%bcond tests 1
06f7832
715af15
%global forgeurl https://github.com/SALib/SALib
715af15
3d8afb1
Name:           python-SALib
e80e9f4
Version:        1.4.7
111d8d1
Release:        %autorelease
92d27a8
Summary:        Tools for global sensitivity analysis
06f7832
715af15
%forgemeta
715af15
06f7832
License:        MIT
6c4ed0c
URL:            https://salib.readthedocs.io
715af15
Source:         %{forgesource}
13522f5
be91050
# Remove a useless shebang line
be91050
# https://github.com/SALib/SALib/pull/592
715af15
Patch:          %{forgeurl}/pull/592.patch
ef79f31
# Remove bogus executable permissions
ef79f31
# https://github.com/SALib/SALib/pull/593
715af15
Patch:          %{forgeurl}/pull/593.patch
be91050
06f7832
BuildArch:      noarch
06f7832
c3963c4
BuildRequires:  python3-devel
c3963c4
317a55b
BuildRequires:  dos2unix
317a55b
BuildRequires:  file
317a55b
92d27a8
%global _description %{expand:
92d27a8
Python implementations of commonly used sensitivity analysis methods. Useful in
92d27a8
systems modeling to calculate the effects of model inputs or exogenous factors
92d27a8
on outputs of interest.}
92d27a8
06f7832
%description %_description
06f7832
e92b6bf
%package -n python3-salib
06f7832
Summary:        %{summary}
06f7832
e92b6bf
%py_provides python3-SALib
e92b6bf
e92b6bf
%description -n python3-salib %_description
06f7832
beeb961
%pyproject_extras_subpkg -n python3-salib distributed
beeb961
06f7832
%prep
715af15
%forgeautosetup -p1
06f7832
c3963c4
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
c3963c4
sed -r -i 's/^([[:blank:]])(.*\bpytest-cov\b)/\1# \2/' pyproject.toml
c3963c4
317a55b
# Correct end of line encodings. See:
317a55b
#
317a55b
# Standardize line terminations
317a55b
# https://github.com/SALib/SALib/pull/591
317a55b
find . -type f -exec file '{}' '+' |
317a55b
  awk -F ':' '/CRLF/ { print $1 }' |
317a55b
  xargs dos2unix --keepdate
06f7832
13522f5
%generate_buildrequires
c3963c4
%pyproject_buildrequires -x distributed %{?with_tests:-x test}
13522f5
06f7832
%build
13522f5
%pyproject_wheel
06f7832
06f7832
%install
13522f5
%pyproject_install
3d8afb1
%pyproject_save_files SALib
06f7832
06f7832
%check
06f7832
%if %{with tests}
afbfab2
%pytest
06f7832
%endif
06f7832
e92b6bf
%files -n python3-salib -f %{pyproject_files}
7aaee00
%doc AUTHORS.rst
7aaee00
%doc CHANGELOG.md
411b0fd
%doc CITATION.cff
7aaee00
%doc CITATIONS.rst
7aaee00
%doc FAQ.MD
7aaee00
%doc README-advanced.md
7aaee00
%doc README.rst
06f7832
%{_bindir}/salib
06f7832
06f7832
%changelog
111d8d1
%autochangelog