## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 # Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate numpy Name: rust-numpy Version: 0.25.0 Release: %autorelease Summary: PyO3-based Rust bindings of the NumPy C-API License: BSD-2-Clause URL: https://crates.io/crates/numpy Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Exclude some unnecessary files from the crate # (https://github.com/PyO3/rust-numpy/pull/510): avoids an unwanted dependency # on the Python interpreter Patch: numpy-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %if %{with check} BuildRequires: python3dist(numpy) %endif %global _description %{expand: PyO3-based Rust bindings of the NumPy C-API.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+half-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+half-devel %{_description} This package contains library source intended for building other packages which use the "half" feature of the "%{crate}" crate. %files -n %{name}+half-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+nalgebra-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+nalgebra-devel %{_description} This package contains library source intended for building other packages which use the "nalgebra" feature of the "%{crate}" crate. %files -n %{name}+nalgebra-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %if 0%{?__isa_bits} == 32 # * Tests dtype::tests::test_dtype_methods_* fail on 32-bit (but not 32-bit # Windows, per upstream CI) because a few sizes and alignments are different # from the hard-coded expected values. We explored fixing this in # https://github.com/PyO3/rust-numpy/pull/511 but it’s just not worth it: we # skip the affected tests instead. %cargo_test -- -- --skip dtype::tests::test_dtype_methods_ %else %cargo_test %endif %endif %changelog ## START: Generated by rpmautospec * Wed Sep 17 2025 Alexander F. Lent - 0.25.0-1 - Initial import (fixes rhbz#2385892). ## END: Generated by rpmautospec