diff --git a/0001-set-cargo-vendor-cache-for-local-build.patch b/0001-set-cargo-vendor-cache-for-local-build.patch new file mode 100644 index 0000000..b20a72f --- /dev/null +++ b/0001-set-cargo-vendor-cache-for-local-build.patch @@ -0,0 +1,29 @@ +From cb1e1e746bd3c707022c852cbd2ca14b98ef0760 Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Fri, 30 Jun 2023 15:10:42 +0800 +Subject: [PATCH] set cargo vendor cache for local build + +--- + .cargo/config.toml | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/.cargo/config.toml b/.cargo/config.toml +index 0e1e094..a587ae2 100644 +--- a/.cargo/config.toml ++++ b/.cargo/config.toml +@@ -8,4 +8,10 @@ rustflags = [ + rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", +-] +\ No newline at end of file ++] ++ ++[source.crates-io] ++replace-with = "vendored-sources" ++ ++[source.vendored-sources] ++directory = "native/vendor" +-- +2.33.0 + diff --git a/cargo-vendor-cache b/cargo-vendor-cache new file mode 100644 index 0000000..13bab9d Binary files /dev/null and b/cargo-vendor-cache differ diff --git a/libcst-0.3.21.tar.gz b/libcst-0.3.21.tar.gz deleted file mode 100644 index 1944b19..0000000 Binary files a/libcst-0.3.21.tar.gz and /dev/null differ diff --git a/libcst-0.4.10.tar.gz b/libcst-0.4.10.tar.gz new file mode 100644 index 0000000..2d82d28 Binary files /dev/null and b/libcst-0.4.10.tar.gz differ diff --git a/python-libcst.spec b/python-libcst.spec index 33fa722..8fdb491 100644 --- a/python-libcst.spec +++ b/python-libcst.spec @@ -1,6 +1,7 @@ %bcond_with docs %bcond_with tests +%global _empty_manifest_terminate_build 0 %global pypi_name libcst %global common_description %{expand: @@ -14,17 +15,21 @@ node types and fields, it creates a lossless CST that looks and feels like an AST.} Name: python-%{pypi_name} -Version: 0.3.21 +Version: 0.4.10 Release: 1 Summary: A concrete syntax tree with AST-like properties for Python 3 License: MIT and (MIT and Python) and ASL 2.0 URL: https://github.com/Instagram/LibCST Source0: %{pypi_source %{pypi_name}} -BuildArch: noarch +Source1: cargo-vendor-cache +Patch1: 0001-set-cargo-vendor-cache-for-local-build.patch +BuildRequires: rust-packaging + BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(setuptools-scm) +BuildRequires: python3dist(setuptools-rust) %if %{with tests} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pyyaml) >= 5.2 @@ -61,7 +66,8 @@ Documentation for %{name} %endif %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -p1 -n %{pypi_name}-%{version} +tar xzvf %{SOURCE1} -C ./native/ %if %{with docs} sed -r \ @@ -82,8 +88,8 @@ rm -rf html/.{doctrees,buildinfo} %files -n python3-%{pypi_name} %license LICENSE %doc README.rst -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/%{pypi_name} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %if %{with docs} %files doc @@ -92,5 +98,8 @@ rm -rf html/.{doctrees,buildinfo} %endif %changelog +* Fri Jun 30 2023 Dongxing Wang - 0.4.10-1 +- Upgrade package to version 0.4.10 + * Tue Jun 6 2023 chaozhangm - 0.3.21-1 - Initial package.