2021-04-21 22:33:27 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-maturin
|
|
|
|
#
|
2025-09-02 15:30:17 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
2021-04-21 22:33:27 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2025-08-21 09:32:22 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2025-07-11 10:58:39 +00:00
|
|
|
%bcond_without libalternatives
|
2025-08-21 09:32:22 +00:00
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
2023-06-11 08:49:51 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2021-04-21 22:33:27 +00:00
|
|
|
Name: python-maturin
|
2025-09-02 15:30:17 +00:00
|
|
|
Version: 1.9.4
|
2021-04-21 22:33:27 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Rust/Python Interoperability
|
2021-05-08 17:13:30 +00:00
|
|
|
License: Apache-2.0 OR MIT
|
2021-04-21 22:33:27 +00:00
|
|
|
URL: https://github.com/PyO3/maturin
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/m/maturin/maturin-%{version}.tar.gz
|
|
|
|
Source1: vendor.tar.xz
|
2022-07-19 12:18:02 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module setuptools-rust >= 1.4.0}
|
2021-04-21 22:33:27 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2022-07-19 12:18:02 +00:00
|
|
|
BuildRequires: %{python_module tomli >= 1.1.0 if %python-base < 3.11}
|
|
|
|
BuildRequires: %{python_module wheel >= 0.36.2}
|
2021-10-01 06:10:26 +00:00
|
|
|
BuildRequires: cargo-packaging
|
2021-04-21 22:33:27 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2025-08-21 09:32:22 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
BuildRequires: alts
|
2025-07-11 10:58:39 +00:00
|
|
|
Requires: alts
|
2025-08-21 09:32:22 +00:00
|
|
|
%else
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
%endif
|
2022-07-19 12:18:02 +00:00
|
|
|
%if 0%{?python_version_nodots} < 311
|
|
|
|
Requires: python-tomli >= 1.1.0
|
|
|
|
%endif
|
2021-04-21 22:33:27 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2024-12-18 13:47:34 +00:00
|
|
|
Build and publish crates with pyo3, cffi and uniffi bindings
|
2021-04-21 22:33:27 +00:00
|
|
|
as well as rust binaries as python packages.
|
|
|
|
|
2024-12-18 13:47:34 +00:00
|
|
|
It supports building wheels for Python 3.8+, can upload them
|
|
|
|
to PyPI and has basic PyPy and GraalPy support.
|
2021-04-21 22:33:27 +00:00
|
|
|
|
|
|
|
%prep
|
2022-12-12 19:31:14 +00:00
|
|
|
%autosetup -a1 -p1 -n maturin-%{version}
|
2022-07-19 12:18:02 +00:00
|
|
|
sed -i '1{/env python/d}' maturin/__init__.py
|
2022-12-12 19:31:14 +00:00
|
|
|
sed -i 's/--locked/--offline/' setup.py
|
2021-04-21 22:33:27 +00:00
|
|
|
|
|
|
|
%build
|
2022-07-19 12:18:02 +00:00
|
|
|
%pyproject_wheel
|
2021-04-21 22:33:27 +00:00
|
|
|
|
|
|
|
%install
|
2022-07-19 12:18:02 +00:00
|
|
|
%pyproject_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2021-04-21 22:33:27 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/maturin
|
|
|
|
|
2024-03-28 16:48:50 +00:00
|
|
|
%check
|
|
|
|
|
2025-08-21 09:32:22 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative maturin
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative maturin
|
|
|
|
|
2025-07-11 10:58:39 +00:00
|
|
|
%pre
|
|
|
|
%python_libalternatives_reset_alternative maturin
|
2021-04-21 22:33:27 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%license license-apache license-mit
|
2022-11-20 07:47:42 +00:00
|
|
|
%doc Changelog.md README.md
|
2021-04-21 22:33:27 +00:00
|
|
|
%python_alternative %{_bindir}/maturin
|
2022-07-19 12:18:02 +00:00
|
|
|
%{python_sitearch}/maturin
|
2024-12-18 13:47:34 +00:00
|
|
|
%{python_sitearch}/maturin-%{version}.dist-info
|
2021-04-21 22:33:27 +00:00
|
|
|
|
|
|
|
%changelog
|