-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-tibs.spec
More file actions
48 lines (39 loc) · 1.14 KB
/
python-tibs.spec
File metadata and controls
48 lines (39 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Rust sucks
%undefine _debugsource_template
%define module tibs
%define oname tibs
Name: python-tibs
Version: 0.5.6
Release: 1
Summary: A sleek Python library for binary data.
License: MIT
Group: Development/Python
URL: https://github.com/scott-griffiths/tibs
Source0: https://github.com/scott-griffiths/tibs/archive/v%{version}/%{oname}-%{version}.tar.gz
Source1: %{oname}-%{version}-vendor.tar.xz
BuildSystem: python
BuildRequires: cargo
BuildRequires: pkgconfig(python3)
BuildRequires: python%{pyver}dist(pip)
BuildRequires: python%{pyver}dist(maturin)
BuildRequires: python%{pyver}dist(wheel)
BuildRequires: rust-packaging
%description
A sleek Python library for binary data.
%prep -a
tar xf %{S:1}
%cargo_prep -v vendor
cat >>.cargo/config <<EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%build -p
# Rust doesnt accept LDFLAGS, instead we need to use RUSTFLAGS to ensure it
# links properly during compile to fix undefined symbols being reported
# during packaging.
export RUSTFLAGS="-lpython%{pyver}"
%files
%{python_sitearch}/%{module}
%{python_sitearch}/%{module}-%{version}.dist-info