]>
Commit | Line | Data |
---|---|---|
398c7412 | 1 | # TODO: finish docs |
30a1b915 AM |
2 | # |
3 | # Conditional build: | |
398c7412 | 4 | %bcond_with doc # Sphinx documentation |
30a1b915 | 5 | %bcond_with tests # unit tests (need rust configured) |
30a1b915 AM |
6 | |
7 | Summary: Setuptools plugin to build Rust Python extensions | |
398c7412 | 8 | Summary(pl.UTF-8): Wtyczka setuptools do budowania rozszerzeń pythonowych w języku Rust |
30a1b915 AM |
9 | Name: python3-setuptools_rust |
10 | Version: 0.12.1 | |
0a648b85 | 11 | Release: 2 |
398c7412 | 12 | License: MIT |
30a1b915 AM |
13 | Group: Libraries/Python |
14 | #Source0Download: https://pypi.org/simple/setuptools-rust/ | |
15 | Source0: https://pypi.debian.net/setuptools_rust/setuptools-rust-%{version}.tar.gz | |
16 | # Source0-md5: 33c3fd3bcde2877483ab782353bee54c | |
17 | URL: https://rusthub.com/msabramo/setuptools-rust | |
398c7412 JB |
18 | BuildRequires: python3-modules >= 1:3.6 |
19 | BuildRequires: python3-setuptools >= 1:46.1 | |
20 | BuildRequires: python3-setuptools_scm >= 3.4.3 | |
21 | BuildRequires: python3-toml >= 0.9.0 | |
30a1b915 AM |
22 | %if %{with tests} |
23 | BuildRequires: rust-core | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
398c7412 JB |
27 | %if %{with doc} |
28 | BuildRequires: python3-m2r2 | |
29 | BuildRequires: python3-sphinx_autodoc_typehints | |
30 | BuildRequires: python3-sphinx_rtd_theme | |
31 | BuildRequires: sphinx-pdg-3 | |
32 | %endif | |
ec51964d | 33 | Requires: cargo |
398c7412 | 34 | Requires: python3-modules >= 1:3.6 |
30a1b915 AM |
35 | BuildArch: noarch |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | %description | |
398c7412 JB |
39 | Compile and distribute Python extensions written in Rust as easily as |
40 | if they were written in C. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Kompilownie i dystrybuowanie napisanych w języku Rust rozszerzeń | |
44 | Pythona tak łatwo, jakby były napisane w C. | |
30a1b915 AM |
45 | |
46 | %prep | |
47 | %setup -q -n setuptools-rust-%{version} | |
48 | ||
49 | %build | |
50 | %py3_build %{?with_tests:test} | |
51 | ||
398c7412 JB |
52 | %if %{with doc} |
53 | %{__make} -C docs html | |
54 | %endif | |
55 | ||
30a1b915 AM |
56 | %install |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %py3_install | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
398c7412 | 66 | %doc CHANGELOG.md LICENSE README.md |
30a1b915 AM |
67 | %{py3_sitescriptdir}/setuptools_rust |
68 | %{py3_sitescriptdir}/setuptools_rust-%{version}-py*.egg-info |