pythran/pythran.spec

289 lines
8.8 KiB
RPMSpec
Raw Permalink Normal View History

2019-07-14 16:17:25 +00:00
Name: pythran
2023-09-07 08:55:46 +00:00
Version: 0.14.0
Release: 2%{?dist}
2019-07-14 16:17:25 +00:00
Summary: Ahead of Time Python compiler for numeric kernels
2019-07-14 18:48:21 +00:00
# pythran is BSD
2021-07-14 09:16:35 +00:00
# pythran/graph.py has bits of networkx, also BSD
2019-07-14 16:17:25 +00:00
# pythran/pythonic/patch/complex is MIT or NCSA
License: BSD and (MIT or NCSA)
# see pythran/pythonic/patch/README.rst
# The version is probably somewhat around 3
Provides: bundled(libcxx) = 3
2021-07-14 09:16:35 +00:00
# see pythran/graph.py
# Only bundles one function from networkx
Provides: bundled(python3dist(networkx)) = 2.6.1
2020-09-18 10:22:44 +00:00
%py_provides python3-%{name}
2019-07-14 16:17:25 +00:00
URL: https://github.com/serge-sans-paille/pythran
2021-07-14 09:16:35 +00:00
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
2019-07-14 16:17:25 +00:00
# there is no actual arched content
# yet we want to test on all architectures
# and we also might need to skip some
%global debug_package %{nil}
BuildRequires: make
2019-07-14 16:17:25 +00:00
BuildRequires: boost-devel
BuildRequires: flexiblas-devel
2019-07-14 16:17:25 +00:00
BuildRequires: gcc-c++
2020-09-18 10:22:44 +00:00
BuildRequires: pyproject-rpm-macros
2019-07-14 16:17:25 +00:00
BuildRequires: python3-devel
2021-12-14 11:43:21 +00:00
BuildRequires: xsimd-devel >= 8
2020-09-18 10:22:44 +00:00
# For docs
# Avoid building the docs by default on RHEL not to drag pandoc into RHEL:
%bcond docs %{undefined rhel}
%if %{with docs}
BuildRequires: pandoc
%endif
2020-09-18 10:22:44 +00:00
# For tests
2019-07-14 16:17:25 +00:00
BuildRequires: python3-pytest
2020-09-18 10:22:44 +00:00
BuildRequires: /usr/bin/python
BuildRequires: python3-scipy
2019-07-14 16:17:25 +00:00
# these packages are not included in RHEL
%if %{undefined rhel}
# this is used for supporting -n auto in %%pytest
BuildRequires: python3-pytest-xdist
# this is only used to test integration with ipython
BuildRequires: /usr/bin/ipython
%endif
2019-07-14 16:17:25 +00:00
# This is a package that compiles code, it runtime requires devel packages
Requires: flexiblas-devel
2019-07-14 16:17:25 +00:00
Requires: gcc-c++
Requires: python3-devel
Requires: boost-devel
2021-12-14 11:43:21 +00:00
Requires: xsimd-devel >= 8
2019-07-14 16:17:25 +00:00
%description
Pythran is an ahead of time compiler for a subset of the Python language, with
a focus on scientific computing. It takes a Python module annotated with a few
interface description and turns it into a native Python module with the same
interface, but (hopefully) faster. It is meant to efficiently compile
scientific programs, and takes advantage of multi-cores and SIMD
instruction units.
2020-09-18 10:22:44 +00:00
2019-07-14 16:17:25 +00:00
%prep
2021-07-14 09:16:35 +00:00
%autosetup -p1 -n %{name}-%{version}
2019-07-14 16:17:25 +00:00
find -name '*.hpp' -exec chmod -x {} +
sed -i '1{/#!/d}' pythran/run.py
# Remove bundled header libs and use the ones from system
rm -r third_party/boost third_party/xsimd
cat >> setup.cfg << EOF
[build_py]
no_boost=True
no_xsimd=True
EOF
# Both OpenBLAS and FlexiBLAS are registered as "openblas" in numpy
2019-07-14 16:17:25 +00:00
sed -i 's|blas=blas|blas=openblas|' pythran/pythran-linux*.cfg
sed -i 's|libs=|libs=flexiblas|' pythran/pythran-linux*.cfg
sed -i 's|include_dirs=|include_dirs=/usr/include/flexiblas|' pythran/pythran-linux*.cfg
2019-07-14 16:17:25 +00:00
2019-12-03 15:37:41 +00:00
# not yet available in Fedora
2020-09-18 10:22:44 +00:00
sed -i '/guzzle_sphinx_theme/d' docs/conf.py docs/requirements.txt
2021-07-14 09:16:35 +00:00
# The tests have some cflags in them
# We need to adapt the flags to play nicely with other Fedora's flags
# E.g. fortify source implies at least -O1
sed -i -e 's/-O0/-O1/g' -e 's/-Werror/-w/g' pythran/tests/__init__.py
2020-09-18 10:22:44 +00:00
%generate_buildrequires
%pyproject_buildrequires %{?with_docs:-x doc}
2020-09-18 10:22:44 +00:00
2019-12-03 15:37:41 +00:00
2019-07-14 16:17:25 +00:00
%build
2020-09-18 10:22:44 +00:00
%pyproject_wheel
%if %{with docs}
2020-09-18 10:22:44 +00:00
PYTHONPATH=$PWD make -C docs html
2019-07-14 16:17:25 +00:00
rm -rf docs/_build/html/.{doctrees,buildinfo}
%endif
2019-07-14 16:17:25 +00:00
2020-09-18 10:22:44 +00:00
2019-07-14 16:17:25 +00:00
%install
2020-09-18 10:22:44 +00:00
%pyproject_install
%pyproject_save_files %{name} omp
2019-07-14 16:17:25 +00:00
2020-09-18 10:22:44 +00:00
%check
2021-12-14 11:43:21 +00:00
# https://bugzilla.redhat.com/show_bug.cgi?id=1747029#c12
k="not test_numpy_negative_binomial"
%if 0%{?__isa_bits} == 32
# These tests cause memory (address space) exhaustion; see discussion in
# https://src.fedoraproject.org/rpms/pythran/pull-request/28.
for t in test_fftn_{8,17,20,22} \
test_{h,ih,ir}fft_{8,14} \
test_{,i}fft_3d{,_axis,f64_axis,int64_axis} \
test_numpy_random_bytes1
do
k="$k and not ${t}"
done
%endif
%ifarch aarch64
# the test is so flaky it makes the build fail almost all the time
k="$k and not test_interp_8"
%endif
2021-12-14 11:43:21 +00:00
%ifarch %{power64}
# https://github.com/serge-sans-paille/pythran/pull/1946#issuecomment-992460026
k="$k and not test_setup_bdist_install3"
%endif
%if %{defined rhel}
# this test needs ipython
k="$k and not test_loadext_and_run"
%endif
# Some tests still want numpy.distutils
# https://github.com/serge-sans-paille/pythran/issues/2148
k="$k and not test_setup_bdist_install3"
k="$k and not test_setup_build3"
k="$k and not test_setup_sdist_install3"
# Dont run tests in parallel on 32-bit architecutres. RRunning tests in serial
# makes memory errors, which occur in some tests on 32-bit architectures, more
# reproducible, and makes the output when they occur less confusing: we tend to
# get individual test failures rather than a pytest INTERNALERROR.
%if %{undefined rhel} && 0%{?__isa_bits} != 32
%global use_pytest_xdist 1
%endif
%pytest %{?use_pytest_xdist:-n auto} -k "$k"
2020-09-18 10:22:44 +00:00
2019-07-14 16:17:25 +00:00
2020-09-18 10:22:44 +00:00
%files -f %{pyproject_files}
2019-07-14 16:17:25 +00:00
%license LICENSE
%doc README.rst
%if %{with docs}
2019-07-14 16:17:25 +00:00
%doc docs/_build/html
%endif
2019-07-14 16:17:25 +00:00
%{_bindir}/%{name}
%{_bindir}/%{name}-config
2020-09-18 10:22:44 +00:00
2019-07-14 16:17:25 +00:00
%changelog
* Thu Oct 05 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-2
- Fix FTBFS: skip tests that need numpy.distutils
- On 32-bit, run tests in serial and skip those that exhaust memory
- Drop obsolete conditionals for 32-bit ARM
2023-09-07 08:55:46 +00:00
* Thu Sep 07 2023 Miro Hrončok <mhroncok@redhat.com> - 0.14.0-1
- Update to 0.14.0
- Fixes: rhbz#2237784
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
2023-07-03 21:44:22 +00:00
* Mon Jul 03 2023 Miro Hrončok <mhroncok@redhat.com> - 0.13.1-1
- Update to 0.13.1
2023-07-03 14:11:40 +00:00
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 0.12.1-4
- Rebuilt for Python 3.12
* Wed Jan 25 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.12.1-3
- Avoid ipython test dependency in RHEL builds
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2023-01-15 08:04:01 +00:00
* Sun Jan 15 2023 Serge Guelton <serge.guelton@telecom-bretagne.eu> - 0.12.1-1
- Update to 0.12.1
2022-09-28 09:49:05 +00:00
* Wed Sep 28 2022 Miro Hrončok <mhroncok@redhat.com> - 0.12.0-1
- Update to 0.12.0
- Fixes: rhbz#2130464
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-06-15 14:35:11 +00:00
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 0.11.0-5
- Rebuilt for Python 3.11
* Tue Mar 15 2022 Miro Hrončok <mhroncok@redhat.com> - 0.11.0-4
- Add a workaround for setuptools 60+,
use distutils from the standard library during the tests
2022-03-14 17:00:40 +00:00
* Mon Mar 14 2022 Serge Guelton - 0.11.0-3
- Fix gcc12 build
- Fixes: rhbz#2046923
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2021-12-14 11:43:21 +00:00
* Tue Dec 14 2021 Miro Hrončok <mhroncok@redhat.com> - 0.11.0-1
- Update to 0.11.0
- Fixes: rhbz#2032254
2021-09-17 12:59:28 +00:00
* Fri Sep 17 2021 Miro Hrončok <mhroncok@redhat.com> - 0.10.0-1
- Update to 0.10.0
- Fixes: rhbz#2003905
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12.post1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2021-07-14 13:05:21 +00:00
* Wed Jul 14 2021 Miro Hrončok <mhroncok@redhat.com> - 0.9.12.post1-1
- Update to 0.9.12.post1
- Fixes: rhbz#1982196
2021-07-14 09:16:35 +00:00
* Wed Jul 14 2021 Miro Hrončok <mhroncok@redhat.com> - 0.9.12-1
- Update to 0.9.12
- Fixes: rhbz#1981981
- Fixes: rhbz#1927172
2021-06-04 19:12:15 +00:00
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.9.11-2
- Rebuilt for Python 3.10
2021-05-23 10:24:40 +00:00
* Sun May 23 2021 sguelton@redhat.com - 0.9.11-1
- Update to 0.9.11
2021-05-09 19:58:38 +00:00
* Sun May 9 2021 sguelton@redhat.com - 0.9.10-1
- Update to 0.9.10
2021-04-01 05:08:21 +00:00
* Wed Mar 31 2021 sguelton@redhat.com - 0.9.9-1
- Update to 0.9.9
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8^post3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 18 2021 Serge Guelton - 0.9.8^post3-2
- Apply compatibility patch with numpy 1.20
* Sun Dec 13 2020 sguelton@redhat.com - 0.9.8^post3-1
- Update to 0.9.8post3
- No longer recommend SciPy
* Wed Sep 23 2020 Miro Hrončok <mhroncok@redhat.com> - 0.9.7-1
- Update to 0.9.7
- Rebuilt for Python 3.9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
- Fixes: rhbz#1818006
- Fixes: rhbz#1787813
* Fri Mar 13 2020 Miro Hrončok <mhroncok@redhat.com> - 0.9.5-2
- Fix tests with ipython 7.12+ (#1813075)
* Fri Jan 31 2020 Miro Hrončok <mhroncok@redhat.com> - 0.9.5-1
- Update to 0.9.5 (#1787813)
2019-12-03 15:37:41 +00:00
* Tue Dec 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.4post1-1
- Update to 0.9.4post1 (#1747029)
* Tue Aug 20 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.3-1
- Update to 0.9.3 (#1743187)
- Allow 32bit architectures
2019-08-19 09:04:04 +00:00
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2019-07-14 16:17:25 +00:00
* Wed Jun 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.2-1
- Initial package