!1 Init package with version 0.1.23

From: @desert-sailor 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2023-07-03 06:10:53 +00:00 committed by Gitee
commit 05a34de1bd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,25 @@
From 2a03d6375707d5184ebacb3b17e08395bb88dd61 Mon Sep 17 00:00:00 2001
From: desert-sailor <dxwangk@isoftstone.com>
Date: Sun, 2 Jul 2023 08:56:49 +0800
Subject: [PATCH] set cargo vendor cache for local build
---
.cargo/config.toml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.cargo/config.toml b/.cargo/config.toml
index bff29e6..a4b6e34 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -1,2 +1,8 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]
+
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "vendor"
--
2.33.0

BIN
cargo-vendor-cache Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,54 @@
%global _empty_manifest_terminate_build 0
%global pypi_name mitmproxy-wireguard
%global source_name mitmproxy_wireguard
Name: python-%{pypi_name}
Version: 0.1.23
Release: 1
Summary: WireGuard interface for mitmproxy.
License: MIT
URL: https://github.com/decathorpe/mitmproxy_wireguard
Source0: %{url}/archive/%{version}/%{source_name}-%{version}.tar.gz
Source1: cargo-vendor-cache
Patch1: 0001-set-cargo-vendor-cache-for-local-build.patch
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
WireGuard interface for mitmproxy.
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
WireGuard interface for mitmproxy.
%prep
%autosetup -p1 -n %{source_name}-%{version}
tar xzvf %{SOURCE1} -C .
%build
%pyproject_build
%install
%pyproject_install
%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{python3_sitearch}/mitmproxy_wireguard
%{python3_sitearch}/mitmproxy_wireguard*.dist-info/
%changelog
* Tue Jun 27 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.1.23-1
- Initial package