## 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 # Because the tests compile NEURON mod files which are arch dependent, we make # this package archful, but disable debuginfo %global debug_package %{nil} %global forgeurl https://github.com/NeuralEnsemble/neurotune/ %global commit a17f0fd192b20e29b032826b6c54568e0bbef445 %global _description %{expand: This package provides Neurotune, a package for optimizing electical models of excitable cells. This package was originally developed by Mike Vella. This has been updated by Padraig Gleeson and others (and moved to NeuralEnsemble) to continue development of pyelectro and Neurotune for use in OpenWorm, Open Source Brain and other projects.} Name: python-neurotune Version: 0.2.3 %forgemeta Release: %autorelease -p Summary: A package for optimizing electical models of excitable cells License: BSD URL: %{forgeurl} Source0: %{forgesource} # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} %description %_description %package -n python3-neurotune Summary: %{summary} BuildRequires: python3-devel # Required for compiling neuron mod files BuildRequires: neuron-devel %description -n python3-neurotune %_description %package doc Summary: Documentation for %{name} %description doc This package provides documentation for %{name}. %prep %forgesetup # Make python versioned in test script sed -i "s|python|%{python3}|" test.sh # Do not pollute the examples folder with compiled bits because we want to package it cp -rv examples/ examples-temp/ sed -i "s|examples|examples-temp|" test.sh # use the Fedora package sed -i "s/.*pyelectro.*/pyelectro/" requirements-dev.txt # Comment out to remove /usr/bin/env shebangs # Can use something similar to correct/remove /usr/bin/python shebangs also # find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # see pyproject-rpm-macros documentation for more forms %generate_buildrequires %pyproject_buildrequires -r requirements-dev.txt %build %pyproject_wheel %install %pyproject_install %pyproject_save_files neurotune %check rm -rf neurotune export PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" ./test.sh %files -n python3-neurotune -f %{pyproject_files} %doc README.md AUTHORS %files doc %license LICENSE %doc examples %changelog * Fri Feb 03 2023 Benjamin A. Beasley 0.2.3-0.10 - Leaf package on ix86: drop ix86 support * Fri Jan 20 2023 Fedora Release Engineering 0.2.3-0.9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering 0.2.3-0.8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 15 2022 Python Maint 0.2.3-0.7 - Rebuilt for Python 3.11 * Tue Feb 01 2022 Ankur Sinha (Ankur Sinha Gmail) 0.2.3-0.6 - feat: make package archful so archful tests are run on all arches * Tue Feb 01 2022 Ankur Sinha (Ankur Sinha Gmail) 0.2.3-0.4 - feat: ready for review * Tue Feb 01 2022 Ankur Sinha (Ankur Sinha Gmail) 0.2.3-0.3 - fix: correct autorelease usage * Tue Feb 01 2022 Ankur Sinha (Ankur Sinha Gmail) 0.2.3-0.2 - WIP: enable tests * Tue Feb 01 2022 Ankur Sinha (Ankur Sinha Gmail) 0.2.3-1 - init spec