Blame mingw-numpy.spec

2b7520
%{?mingw_package_header}
2b7520
2b7520
%global pkgname numpy
2b7520
2b7520
Name:          mingw-%{pkgname}
2b7520
Summary:       MinGW Windows Python %{pkgname} library
686596
Version:       1.17.4
686596
Release:       1%{?dist}
2b7520
BuildArch:     noarch
2b7520
2b7520
# Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python
0ec574
License:       BSD and Python
0ec574
URL:           http://www.numpy.org/
0ec574
Source0:       https://github.com/%{pkgname}/%{pkgname}/releases/download/v%{version}/%{pkgname}-%{version}.tar.gz
2b7520
a14aa4
# Don't use MSC specific stuff
a14aa4
Patch0:        numpy_mingw.patch
a14aa4
2b7520
591b29
BuildRequires: mingw32-filesystem >= 102
2b7520
BuildRequires: mingw32-gcc
336ace
BuildRequires: mingw32-python3
336ace
BuildRequires: mingw32-python3-Cython
336ace
BuildRequires: mingw32-python3-setuptools
2b7520
591b29
BuildRequires: mingw64-filesystem >= 102
2b7520
BuildRequires: mingw64-gcc
336ace
BuildRequires: mingw64-python3
336ace
BuildRequires: mingw64-python3-Cython
336ace
BuildRequires: mingw64-python3-setuptools
2b7520
2b7520
2b7520
%description
336ace
%package -n mingw32-python3-%{pkgname}
336ace
Summary:       MinGW Windows Python3 %{pkgname} library
336ace
336ace
%description -n mingw32-python3-%{pkgname}
336ace
MinGW Windows Python3 %{pkgname} library.
336ace
336ace
336ace
%package -n mingw64-python3-%{pkgname}
336ace
Summary:       MinGW Windows Python3 %{pkgname} library
336ace
336ace
%description -n mingw64-python3-%{pkgname}
336ace
MinGW Windows Python3 %{pkgname} library.
336ace
336ace
591b29
%{?mingw_debug_package}
2b7520
2b7520
2b7520
%prep
2b7520
%autosetup -p1 -n %{pkgname}-%{version}
2b7520
2b7520
2b7520
%build
a14aa4
# Add -fno-asynchronous-unwind-tables to workaround "Error: invalid register for .seh_savexmm"
a14aa4
# See https://stackoverflow.com/questions/43152633/invalid-register-for-seh-savexmm-in-cygwin
a14aa4
CFLAGS="%{mingw32_cflags} -fno-asynchronous-unwind-tables" %{mingw32_python3} setup.py build -b build_py3_mingw32
a14aa4
CFLAGS="%{mingw64_cflags} -fno-asynchronous-unwind-tables" %{mingw64_python3} setup.py build -b build_py3_mingw64
2b7520
2b7520
2b7520
%install
336ace
ln -s build_py3_mingw32 build
a14aa4
%{mingw32_python3} setup.py install -O1 --root=%{buildroot} --skip-build
336ace
rm build
336ace
336ace
ln -s build_py3_mingw64 build
a14aa4
%{mingw64_python3} setup.py install -O1 --root=%{buildroot} --skip-build
2b7520
rm build
2b7520
9274b4
# FIXME: These files are not installed for some reason
9274b4
cp -a build_py3_mingw32/src.mingw-%{mingw32_python3_version}/numpy/core/include/numpy/*.h %{buildroot}%{mingw32_python3_sitearch}/numpy/core/include/numpy/
9274b4
cp -a build_py3_mingw32/src.mingw-%{mingw32_python3_version}/numpy/core/include/numpy/*.txt %{buildroot}%{mingw32_python3_sitearch}/numpy/core/include/numpy/
9274b4
cp -a build_py3_mingw64/src.mingw-%{mingw64_python3_version}/numpy/core/include/numpy/*.h %{buildroot}%{mingw64_python3_sitearch}/numpy/core/include/numpy/
9274b4
cp -a build_py3_mingw64/src.mingw-%{mingw64_python3_version}/numpy/core/include/numpy/*.txt %{buildroot}%{mingw64_python3_sitearch}/numpy/core/include/numpy/
9274b4
9274b4
# Symlink includedir
9274b4
mkdir -p %{buildroot}%{mingw32_includedir}
9274b4
mkdir -p %{buildroot}%{mingw64_includedir}
9274b4
ln -s %{mingw32_python3_sitearch}/numpy/core/include/numpy/ %{buildroot}%{mingw32_includedir}/numpy
9274b4
ln -s %{mingw64_python3_sitearch}/numpy/core/include/numpy/ %{buildroot}%{mingw64_includedir}/numpy
9274b4
591b29
# Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly)
336ace
find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-%{pkgname}.debugfiles
336ace
find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-%{pkgname}.debugfiles
2b7520
591b29
336ace
%files -n mingw32-python3-%{pkgname} -f mingw32-%{pkgname}.debugfiles
336ace
%license LICENSE.txt
a14aa4
%{mingw32_bindir}/f2py
336ace
%{mingw32_bindir}/f2py3
336ace
%{mingw32_bindir}/f2py%{mingw32_python3_version}
9274b4
%{mingw32_includedir}/%{pkgname}
336ace
%{mingw32_python3_sitearch}/*
336ace
336ace
%files -n mingw64-python3-%{pkgname} -f mingw64-%{pkgname}.debugfiles
336ace
%license LICENSE.txt
a14aa4
%{mingw64_bindir}/f2py
336ace
%{mingw64_bindir}/f2py3
336ace
%{mingw64_bindir}/f2py%{mingw32_python3_version}
9274b4
%{mingw64_includedir}/%{pkgname}
336ace
%{mingw64_python3_sitearch}/*
336ace
2b7520
2b7520
%changelog
686596
* Tue Nov 12 2019 Sandro Mani <manisandro@gmail.com> - 1.17.4-1
686596
- Update to 1.17.4
686596
9274b4
* Thu Oct 24 2019 Sandro Mani <manisandro@gmail.com> - 1.17.3-2
9274b4
- Link devel files to include dir
9274b4
- Add missing headers
9274b4
84d382
* Fri Oct 18 2019 Sandro Mani <manisandro@gmail.com> - 1.17.3-1
84d382
- Update to 1.17.3
84d382
225967
* Tue Oct 08 2019 Sandro Mani <manisandro@gmail.com> - 1.17.2-2
225967
- Rebuild (Changes/Mingw32GccDwarf2)
225967
bb0b27
* Fri Sep 27 2019 Sandro Mani <manisandro@gmail.com> - 1.17.2-1
bb0b27
- Update to 1.17.2
bb0b27
a14aa4
* Fri Aug 02 2019 Sandro Mani <manisandro@gmail.com> - 1.17.0-1
a14aa4
- Update to 1.17.0
a14aa4
- Drop python2 packages
a14aa4
15ae3e
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.4-2
15ae3e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
15ae3e
0eb8b3
* Tue Jul 02 2019 Sandro Mani <manisandro@gmail.com> - 1.16.4-1
0eb8b3
- Update to 1.16.4
0eb8b3
336ace
* Wed May 01 2019 Sandro Mani <manisandro@gmail.com> - 1.16.3-2
336ace
- Add python3 subpackages
336ace
ee9ed6
* Tue Apr 23 2019 Sandro Mani <manisandro@gmail.com> - 1.16.3-1
ee9ed6
- Update to 1.16.3
ee9ed6
42f27f
* Wed Feb 27 2019 Sandro Mani <manisandro@gmail.com> - 1.16.2-1
42f27f
- Update to 1.16.2
42f27f
b659c2
* Mon Feb 04 2019 Sandro Mani <manisandro@gmail.com> - 1.16.1-1
b659c2
- Update to 1.16.1
b659c2
f2a4c1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-2
f2a4c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f2a4c1
12103c
* Tue Jan 22 2019 Sandro Mani <manisandro@gmail.com> - 1.16.0-1
12103c
- Update to 1.16.0
12103c
28b9b7
* Thu Aug 30 2018 Sandro Mani <manisandro@gmail.com> - 1.15.1-1
28b9b7
- Update to 1.15.1
28b9b7
a3b87e
* Thu Aug 02 2018 Sandro Mani <manisandro@gmail.com> - 1.15.0-1
a3b87e
- Update to 1.15.0
a3b87e
1dd4f0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.5-2
1dd4f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
1dd4f0
cc5f42
* Thu Jun 14 2018 Sandro Mani <manisandro@gmail.com> - 1.14.5-1
cc5f42
- Update to 1.14.5
cc5f42
12ee93
* Wed May 02 2018 Sandro Mani <manisandro@gmail.com> - 1.14.3-1
12ee93
- Update to 1.14.3
12ee93
af76e7
* Tue Mar 13 2018 Sandro Mani <manisandro@gmail.com> - 1.14.2-1
af76e7
- Update to 1.14.2
af76e7
54ecab
* Thu Feb 22 2018 Sandro Mani <manisandro@gmail.com> - 1.14.1-1
54ecab
- Update to 1.14.1
54ecab
5bb5b9
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.3-2
5bb5b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5bb5b9
0ec574
* Sun Oct 08 2017 Sandro Mani <manisandro@gmail.com> - 1.13.3-1
0ec574
- Update to 1.13.3
0ec574
fd0de5
* Fri Sep 29 2017 Sandro Mani <manisandro@gmail.com> - 1.13.2-1
fd0de5
- Update to 1.13.2
fd0de5
591b29
* Sat Sep 09 2017 Sandro Mani <manisandro@gmail.com> - 1.13.1-2
591b29
- Rebuild for mingw-filesystem
591b29
2b7520
* Sat Sep 02 2017 Sandro Mani <manisandro@gmail.com> - 1.13.1-1
2b7520
- Initial package