From e0249739e1b5326d1b50fdd30d3f9c0dd150630e Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Thu, 20 Jul 2023 20:42:27 +0200 Subject: [PATCH] Initial import (fedora#2222367) --- .gitignore | 1 + python-rpds-py.spec | 69 +++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 71 insertions(+) create mode 100644 .gitignore create mode 100644 python-rpds-py.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6457d1c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rpds_py-0.9.2.tar.gz diff --git a/python-rpds-py.spec b/python-rpds-py.spec new file mode 100644 index 0000000..58b50f0 --- /dev/null +++ b/python-rpds-py.spec @@ -0,0 +1,69 @@ +%global srcname rpds-py +%global modname rpds_py + +Name: python-rpds-py +Version: 0.9.2 +Release: %autorelease +Summary: Python bindings to the Rust rpds crate +# Full license breakdown in LICENSES.dependencies +License: MIT AND Apache-2.0 AND (MIT OR Apache-2.0) AND MPL-2.0 +URL: https://github.com/crate-py/rpds +Source: %{pypi_source %{modname}} + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +# Also rust-rpds is not available on i686 +ExcludeArch: %{ix86} + +BuildRequires: cargo-rpm-macros +BuildRequires: dos2unix +BuildRequires: python3-devel + +%global _description %{expand: +Python bindings to the Rust rpds crate.} + +%description %_description + +%package -n python3-%{srcname} +Summary: %{summary} + +%description -n python3-%{srcname} %_description + + +%prep +%autosetup -p1 -n %{modname}-%{version} + +# Fix line terminations +dos2unix README* LICENSE* *.pyi + +%cargo_prep + + +%generate_buildrequires +%pyproject_buildrequires tests/requirements.in +%cargo_generate_buildrequires + + +%build +export RUSTFLAGS='%{build_rustflags}' +%cargo_license_summary +%{cargo_license} > LICENSES.dependencies +%pyproject_wheel + + +%install +%pyproject_install + +%pyproject_save_files rpds + + +%check +%pytest -vv + + +%files -n python3-%{srcname} -f %{pyproject_files} +%license LICENSE LICENSES.dependencies +%doc README.rst + + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..7e2bd67 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rpds_py-0.9.2.tar.gz) = 5a3d1b4ca27cd9b73edf7c03c8def5350949a56df0a322e317a7d3e6e31933694fe21928218ebeb51074322dcde6e4f807283e0359f8f31b0ca6b69180be3260