public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-libcst] rawhide: Stop patching out Python extension support
@ 2026-11-19  0:05 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-11-19  0:05 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rust-libcst
            Branch : rawhide
            Commit : 5de0ac6262e918975db64006ed069e739b75164d
            Author : Benjamin A. Beasley <code@musicinmybrain.net>
            Date   : 2026-09-25T17:03:17+01:00
            Stats  : +36/-39 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rust-libcst/c/5de0ac6262e918975db64006ed069e739b75164d?branch=rawhide

            Log:
            Stop patching out Python extension support

We want python-libcst to build with the packaged rust-libcst

---
diff --git a/libcst-fix-metadata.diff b/libcst-fix-metadata.diff
index cc602ec..f0cea92 100644
--- a/libcst-fix-metadata.diff
+++ b/libcst-fix-metadata.diff
@@ -1,51 +1,24 @@
 --- libcst-1.9.0/Cargo.toml	2006-07-24T01:21:28+00:00
-+++ libcst-1.9.0/Cargo.toml	2026-09-25T08:52:50.317476+00:00
-@@ -34,11 +34,7 @@
- repository = "https://github.com/Instagram/LibCST"
- 
- [features]
--default = ["py"]
--py = [
--    "pyo3",
--    "pyo3/extension-module",
--]
-+default = []
- trace = ["peg/trace"]
- 
- [lib]
-@@ -52,15 +48,6 @@
- [[bin]]
++++ libcst-1.9.0/Cargo.toml	2026-09-25T10:05:54.140041+00:00
+@@ -53,10 +53,6 @@
  name = "parse"
  path = "src/bin.rs"
--
+ 
 -[[test]]
 -name = "parser_roundtrip"
 -path = "tests/parser_roundtrip.rs"
 -
--[[bench]]
--name = "parser_benchmark"
--path = "benches/parser_benchmark.rs"
--harness = false
- 
- [dependencies.annotate-snippets]
- version = "0.11.5"
-@@ -77,19 +64,11 @@
- [dependencies.peg]
- version = "0.8.5"
- 
--[dependencies.pyo3]
--version = "0.29"
--optional = true
--
- [dependencies.regex]
- version = "1.11.2"
- 
+ [[bench]]
+ name = "parser_benchmark"
+ path = "benches/parser_benchmark.rs"
+@@ -87,10 +83,6 @@
  [dependencies.thiserror]
  version = "2.0.12"
--
+ 
 -[dev-dependencies.criterion]
 -version = "0.6.0"
 -features = ["html_reports"]
- 
+-
  [dev-dependencies.difference]
  version = "2.0.0"
+ 

diff --git a/rust-libcst.spec b/rust-libcst.spec
index 4a3259d..6a23ade 100644
--- a/rust-libcst.spec
+++ b/rust-libcst.spec
@@ -17,7 +17,7 @@ URL:            https://crates.io/crates/libcst
 Source:         %{crates_source}
 # Manually created patch for downstream crate metadata changes
 # * drop unused, benchmark-only criterion dev-dependency
-# * drop unused support for building the crate as a Python extension module
+# * omit parser_roundtrip test not shipped in the crate
 Patch:          libcst-fix-metadata.diff
 
 BuildRequires:  cargo-rpm-macros >= 26
@@ -55,6 +55,30 @@ use the "default" feature of the "%{crate}" crate.
 %files       -n %{name}+default-devel
 %ghost %{crate_instdir}/Cargo.toml
 
+%package     -n %{name}+py-devel
+Summary:        %{summary}
+BuildArch:      noarch
+
+%description -n %{name}+py-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "py" feature of the "%{crate}" crate.
+
+%files       -n %{name}+py-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package     -n %{name}+pyo3-devel
+Summary:        %{summary}
+BuildArch:      noarch
+
+%description -n %{name}+pyo3-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "pyo3" feature of the "%{crate}" crate.
+
+%files       -n %{name}+pyo3-devel
+%ghost %{crate_instdir}/Cargo.toml
+
 %package     -n %{name}+trace-devel
 Summary:        %{summary}
 BuildArch:      noarch

diff --git a/rust2rpm.toml b/rust2rpm.toml
index 3e17fb9..03333f9 100644
--- a/rust2rpm.toml
+++ b/rust2rpm.toml
@@ -1,7 +1,7 @@
 [package]
 cargo-toml-patch-comments = [
     "drop unused, benchmark-only criterion dev-dependency",
-    "drop unused support for building the crate as a Python extension module",
+    "omit parser_roundtrip test not shipped in the crate",
 ]
 cargo-install-bin = false
 suppress-cdylib-install-fixme = true

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-19  0:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19  0:05 [rpms/rust-libcst] rawhide: Stop patching out Python extension support Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox