2021-11-28 21:30:04 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-setuptools-rust
|
|
|
|
#
|
2024-01-29 15:08:40 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2021-11-28 21:30:04 +01: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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-21 16:24:15 +02:00
|
|
|
%global skip_python2 1
|
|
|
|
%{?sle15_python_module_pythons}
|
2021-11-28 21:30:04 +01:00
|
|
|
Name: python-setuptools-rust
|
2024-02-29 10:35:40 +01:00
|
|
|
Version: 1.9.0
|
2021-11-28 21:30:04 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Setuptools plugin for Rust extensions
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
URL: https://github.com/PyO3/setuptools-rust
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/setuptools-rust/setuptools-rust-%{version}.tar.gz
|
2022-07-20 12:10:13 +02:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2021-11-28 21:30:04 +01:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module semantic_version >= 2.8.2}
|
2022-07-18 08:21:35 +02:00
|
|
|
BuildRequires: %{python_module setuptools >= 62.4}
|
2021-11-28 21:30:04 +01:00
|
|
|
BuildRequires: %{python_module wheel}
|
2022-07-20 12:10:13 +02:00
|
|
|
BuildRequires: cargo
|
2022-07-18 09:35:58 +02:00
|
|
|
BuildRequires: fdupes
|
2021-11-28 21:30:04 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-07-20 12:10:13 +02:00
|
|
|
BuildRequires: rust
|
|
|
|
Requires: cargo
|
2021-11-28 21:30:04 +01:00
|
|
|
Requires: python-semantic_version >= 2.8.2
|
2022-07-20 12:10:13 +02:00
|
|
|
Requires: python-setuptools >= 62.4
|
2024-01-29 15:15:22 +01:00
|
|
|
%if 0%{?python_version_nodots} < 311
|
|
|
|
Requires: python-tomli >= 1.2.1
|
|
|
|
%endif
|
2022-07-20 12:10:13 +02:00
|
|
|
Requires: rust
|
2021-11-28 21:30:04 +01:00
|
|
|
BuildArch: noarch
|
2022-07-18 09:38:57 +02:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
2021-11-28 21:30:04 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
setuptools-rust is a plugin for setuptools to build Rust Python extensions
|
|
|
|
implemented with PyO3 or rust-cpython.
|
|
|
|
|
|
|
|
Compile and distribute Python extensions written in Rust as easily as if they
|
|
|
|
were written in C.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n setuptools-rust-%{version}
|
|
|
|
|
|
|
|
%build
|
2022-07-20 12:10:13 +02:00
|
|
|
%pyproject_wheel
|
2021-11-28 21:30:04 +01:00
|
|
|
|
|
|
|
%install
|
2022-07-20 12:10:13 +02:00
|
|
|
%pyproject_install
|
2022-07-18 09:35:58 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2021-11-28 21:30:04 +01:00
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
2023-01-02 10:53:54 +01:00
|
|
|
# network / crates.io access
|
2024-01-29 15:08:40 +01:00
|
|
|
%pytest tests/ -k "not test_get_lib_name_namespace_package and not test_metadata_contents and not test_metadata_cargo_log"
|
2022-07-18 09:35:58 +02:00
|
|
|
|
2021-11-28 21:30:04 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2022-07-20 12:10:13 +02:00
|
|
|
%{python_sitelib}/setuptools_rust-%{version}*-info
|
|
|
|
%{python_sitelib}/setuptools_rust
|
2021-11-28 21:30:04 +01:00
|
|
|
|
|
|
|
%changelog
|