Init package

This commit is contained in:
desert-sailor 2023-07-02 03:04:28 +08:00
parent 5910078223
commit d90fcd19c8
4 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,41 @@
From ea4692d3383fe2f9a49c980009a81d3042703bfa Mon Sep 17 00:00:00 2001
From: desert-sailor <dxwangk@isoftstone.com>
Date: Wed, 5 Jul 2023 09:17:51 +0800
Subject: [PATCH] set cargo vendor cache for local build
---
.cargo/config.toml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/.cargo/config.toml b/.cargo/config.toml
index d6ef99b..52e065b 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -35,3 +35,24 @@ rustflags = [
"-Wclippy::rest_pat_in_fully_bound_structs",
"-Wunreachable_pub"
]
+
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source."git+https://github.com/astral-sh/RustPython-Parser.git?rev=c174bbf1f29527edd43d432326327f16f47ab9e0"]
+git = "https://github.com/astral-sh/RustPython-Parser.git"
+rev = "c174bbf1f29527edd43d432326327f16f47ab9e0"
+replace-with = "vendored-sources"
+
+[source."git+https://github.com/charliermarsh/LibCST?rev=80e4c1399f95e5beb532fdd1e209ad2dbb470438"]
+git = "https://github.com/charliermarsh/LibCST"
+rev = "80e4c1399f95e5beb532fdd1e209ad2dbb470438"
+replace-with = "vendored-sources"
+
+[source."git+https://github.com/youknowone/unicode_names2.git?rev=4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde"]
+git = "https://github.com/youknowone/unicode_names2.git"
+rev = "4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde"
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "vendor"
--
2.33.0

BIN
cargo-vendor-cache Normal file

Binary file not shown.

54
python-ruff.spec Normal file
View File

@ -0,0 +1,54 @@
%global _empty_manifest_terminate_build 0
%global pypi_name ruff
Name: python-%{pypi_name}
Version: 0.0.276
Release: 1
Summary: An extremely fast Python linter, written in Rust.
License: MIT
URL: https://github.com/astral-sh/ruff
Source0: https://files.pythonhosted.org/packages/f7/9b/e8c42f8e0bb21a2d82b8f414c55fbf498cdfe72922bf73c973267477fd46/ruff-0.0.276.tar.gz
Source1: cargo-vendor-cache
Patch1: 0001-set-cargo-vendor-cache-for-local-build.patch
BuildRequires: rust-packaging
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-hatchling
BuildRequires: python3-maturin
%description
An extremely fast Python linter, written in Rust.
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
An extremely fast Python linter, written in Rust.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
tar xzvf %{SOURCE1} -C .
%build
%pyproject_build
%install
%pyproject_install
%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{_bindir}/ruff
%{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}*.dist-info/
%changelog
* Sun Jul 2 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.0.276-1
- Initial package

BIN
ruff-0.0.276.tar.gz Normal file

Binary file not shown.