summaryrefslogtreecommitdiff
path: root/python-xingque.spec
blob: 8f5a7cefebae97df72a759990bf6fe745f64a972 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
%global _empty_manifest_terminate_build 0
%global _name xingque

Name:           python-%{_name}
Version:        0.2.0
Release:        1
Summary:        Yet another Python binding to starlark-rust, exposing the Starlark language to your Python projects.

License:        Apache-2.0
URL:            https://github.com/xen0n/xingque
Source0:        %{url}/archive/%{version}/%{_name}-%{version}.tar.gz
Source1:        cargo-vendor.tar.gz

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-setuptools-rust
BuildRequires:  python3-pip
BuildRequires:  python3-wheel
BuildRequires:	python3-hatchling
BuildRequires:	python3-maturin
BuildRequires:	rust-packaging

%description
Yet another Python binding to starlark-rust, exposing the Starlark language to your Python projects.

%package -n     python3-%{_name}
Summary:        %{summary}

%description -n python3-%{_name}
Yet another Python binding to starlark-rust, exposing the Starlark language to your Python projects.

%prep
%autosetup -p1 -n %{_name}-%{version}
tar xzvf %{SOURCE1} -C .
mkdir .cargo
cat >> .cargo/config.toml << EOF
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
EOF


%build
%pyproject_build

%install
%pyproject_install

%files -n python3-%{_name}
%doc README.md CHANGELOG.md
%license LICENSE.txt
%{python3_sitearch}/%{_name}
%{python3_sitearch}/%{_name}*.dist-info/

%changelog
* Sun Aug 18 2024 weilinfox <caiweilin@iscas.ac.cn> - 0.2.0-1
- Initial package