diff --git a/.gitignore b/.gitignore index f3504ed..b3b3fb2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /LFPy-2.1.2.tar.gz /LFPy-2.2.1.tar.gz /LFPy-2.2.2.tar.gz +/LFPy-2.2.4.tar.gz diff --git a/python-lfpy.spec b/python-lfpy.spec index e2034e1..74d241a 100644 --- a/python-lfpy.spec +++ b/python-lfpy.spec @@ -24,22 +24,25 @@ ExcludeArch: mips64r2 mips32r2 s390 ExcludeArch: %{power64} %{ix86} armv7hl -BuildRequires: gcc -BuildRequires: libtool -BuildRequires: readline-devel -BuildRequires: ncurses-devel BuildRequires: python3-devel -BuildRequires: %{py3_dist cython} -BuildRequires: %{py3_dist h5py} -BuildRequires: %{py3_dist lfpykit} -BuildRequires: %{py3_dist meautility} -BuildRequires: %{py3_dist neuron} +BuildRequires: python3-wheel +BuildRequires: python3-pip + +# Automatic dep generator doesn't like the mod files mentioned in the setup.py file, and tries to parse them as deps: +# error: Dependency tokens must begin with alpha-numeric, '_' or '/': "./expsyni.mod" "./sinsyn.mod" +# Should maybe reported as a pyproject rpm macro bug? +# So we install these manually + +BuildRequires: python3-Cython +BuildRequires: python3-numpy +BuildRequires: python3-scipy +BuildRequires: python3-lfpykit >= 0.4 +BuildRequires: python3-h5py +BuildRequires: python3-neuron BuildRequires: neuron-devel -BuildRequires: %{py3_dist pytest} -BuildRequires: %{py3_dist numpy} -BuildRequires: %{py3_dist scipy} -BuildRequires: %{py3_dist setuptools} +BuildRequires: python3-pytest +# not included in setup.py BuildRequires: python3-mpi4py-openmpi BuildRequires: python3-neuron-openmpi BuildRequires: python3-mpi4py-mpich @@ -55,22 +58,16 @@ BuildRequires: rpm-mpi-hooks %package -n python3-lfpy Summary: %{summary} -%description -n python3-lfpy -%{desc} - -%py_provides python3-lfpy - -Requires: %{py3_dist h5py} -Requires: %{py3_dist numpy} -Requires: %{py3_dist scipy} -Requires: %{py3_dist neuron} Requires: python3-mpi4py-openmpi Requires: python3-mpi4py-mpich +Requires: neuron-devel + + +%description -n python3-lfpy +%{desc} %prep %autosetup -n LFPy-%{version} -# Remove bundled egg-info -rm -rf LFPy.egg-info # Remove mpi4py from requirements sed -i '/mpi4py/ d' setup.py @@ -82,10 +79,17 @@ for lib in $(find . -type f -name "*.py"); do done %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install + +# Remove unneeded test files: they include objects and libraries generated from neuron. +#rm -rf %{buildroot}/%{python3_sitearch}/LFPy/test/ +# Remove associated debuginfo files +#rm -rf %{buildroot}/usr/lib/debug/%{python3_sitearch}/LFPy/test/ + +%pyproject_save_files LFPy %check @@ -99,17 +103,12 @@ done %{_openmpi_unload} -# Remove unneeded test files: they include objects and libraries generated from neuron. -rm -rf %{buildroot}/%{python3_sitearch}/LFPy/test/ -# Remove associated debuginfo files -rm -rf %{buildroot}/usr/lib/debug/%{python3_sitearch}/LFPy/test/ - -%files -n python3-lfpy -%license LICENSE +%files -n python3-lfpy -f %{pyproject_files} %doc README.md -%{python3_sitearch}/LFPy -%{python3_sitearch}/LFPy-%{version}-py%{python3_version}.egg-info +# temporary files generated for test +%exclude %{python3_sitearch}/LFPy/test/x86_64 +%exclude %{python3_sitearch}/LFPy/test/ %changelog %autochangelog diff --git a/sources b/sources index 4325e25..c23b4c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (LFPy-2.2.2.tar.gz) = bbf234d404d55136992ae605897ade5f145b55c814510f6b8cb035b553486ec54d6929051d9876b80f17c93884c9890248077dd2cbb8d866442265ed678e7e2f +SHA512 (LFPy-2.2.4.tar.gz) = 368e78ccbf31adbfee205958786f69c77dc0e972b6ff437a8ba294597c032783087224e662ddb51a4ea1e49c2c31612e90e6c007393c4c2cda5a9aa25d128041