diff --git a/README.md b/README.md index 13192cc..da00dea 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # python-maturin +Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages. + diff --git a/python-maturin.spec b/python-maturin.spec new file mode 100644 index 0000000..384f0f6 --- /dev/null +++ b/python-maturin.spec @@ -0,0 +1,57 @@ +%define pkgname %(echo %name | cut -d- -f2- | tr - _) +Name: python-maturin +Version: 1.2.3 +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 +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: libpython310-devel +BuildRequires: python3.10dist(tomli) +## 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 +* Sat Sep 09 2023 Silvan Calarco 1.2.3-1mamba +- package created using the webbuild interface