## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 10; 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 Name: python-neatdend Version: 0.9.2 Release: %autorelease Summary: NEAT (NEural Analysis Toolkit) License: GPLv3 URL: https://github.com/unibe-cns/NEAT Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Patches: https://github.com/sanjayankur31/NEAT/tree/fedora-v0.9.2 # Support all arches for Neuron libs # issue filed: https://github.com/unibe-cns/NEAT/issues/142 Patch0: 0001-feat-support-all-arches.patch Patch1: https://github.com/unibe-cns/NEAT/commit/504b39822b9913e5a8c6aff65df840cc2e31167d.patch # Fix compatibility with recent Matplotlib Patch2: https://github.com/unibe-cns/NEAT/commit/8eb1f4be85da0c8fdbcbac627c5198a67e29b22c.patch BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: gcc gcc-c++ BuildRequires: git-core BuildRequires: python3-neuron BuildRequires: neuron-devel %global _description %{expand: NEAT is a python library for the study, simulation and simplification of morphological neuron models.} %description %_description %package -n python3-neatdend Summary: %{summary} %description -n python3-neatdend %_description %prep %autosetup -n NEAT-%{version} -S git sed -i 's/^numpy~=1.20.2/numpy>=1.20.2/' requirements/requirements.txt sed -i 's/^matplotlib~=3.4.1/matplotlib>=3.4.1/' requirements/requirements.txt sed -i 's/^pytest~=5.3.2/pytest>=5.3.2/' requirements/requirements.txt sed -i 's/^scikit_learn~=0.24.2/scikit_learn>=0.24.2/' requirements/requirements.txt sed -i 's/^scipy~=1.6.3/scipy>=1.6.3/' requirements/requirements.txt sed -i 's/^sympy~=1.7.1/sympy>=1.7.1/' requirements/requirements.txt %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %install %pyproject_install %pyproject_save_files neat %check # a few tests fail on i686. # Upstream report: https://github.com/unibe-cns/NEAT/issues/142#issuecomment-1107874903 %ifnarch %{ix86} # we need to run these in a different directory to ensure that the module isn't # imported from the source directory mkdir testdir && pushd testdir # Python path must be defined so that compilechannels uses the installed module PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib}:$RPM_BUILD_ROOT/%{python3_sitearch} $RPM_BUILD_ROOT/%{_bindir}/compilechannels default %pytest ../ popd %endif # remove files generated for the tests rm -rf find $RPM_BUILD_ROOT/%{python3_sitearch}/neat/tools/simtools/neuron/mech/*.mod rm -rf find $RPM_BUILD_ROOT/%{python3_sitearch}/neat/tools/simtools/neuron/%{_arch} %files -n python3-neatdend -f %{pyproject_files} %doc README.rst CODE_OF_CONDUCT.rst CONTRIBUTING.rst CONTRIBUTORS.rst %{_bindir}/compilechannels %changelog * Fri Jan 20 2023 Fedora Release Engineering 0.9.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Oct 29 2022 Sandro 0.9.2-9 - Rebuild for FTBFS (RHBZ#2129862) * Sat Aug 20 2022 Elliott Sales de Andrade 0.9.2-8 - Fix compatibility with Matplotlib 3.6.0 * Fri Jul 22 2022 Fedora Release Engineering 0.9.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jul 08 2022 Vanessa_kris 0.9.2-6 - delted *src.rpm * Fri Jul 08 2022 Vanessa_kris 0.9.2-5 - Added 504b39822b9913e5a8c6aff65df840cc2e31167d.patch * Thu Jul 07 2022 Vanessa_kris 0.9.2-3 - Revert "build fails" * Thu Jul 07 2022 Vanessa_kris 0.9.2-2 - build fails * Thu Jul 07 2022 Vanessa_kris 0.9.2-1 - updated spec file