python-maturin/python-maturin.spec

60 lines
1.7 KiB
RPMSpec

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-maturin
Version: 1.3.0
Release: 1mamba
Summary: Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/pyo3/maturin
Source: http://pypi.debian.net/maturin/maturin-%{version}.tar.gz
License: MIT, Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libbzip2-devel
BuildRequires: libgcc
BuildRequires: libpython311-devel
## AUTOBUILDREQ-END
%description
%{summary}.
%define _build_id_links none
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q -n maturin-%{version}
%build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
%if "%{?with_pyver}" != "3"
# Rename any conflicting file outside of python site packages tree
for f in %{_bindir}/maturin; do
mv %{buildroot}${f}{,-%{?pyappend}}
done
%endif
%files %{?pyappend}
%defattr(-,root,root)
%{_bindir}/maturin*
%dir %{python_sitearch}/%{pkgname}-%{version}.dist-info
%{python_sitearch}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitearch}/%{pkgname}
%{python_sitearch}/%{pkgname}/*
%changelog
* Tue Oct 03 2023 Automatic Build System <autodist@mambasoft.it> 1.3.0-1mamba
- automatic version update by autodist
* Sat Sep 09 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.3-1mamba
- package created using the webbuild interface