Compare commits

..

No commits in common. "factory" and "devel" have entirely different histories.

5 changed files with 64 additions and 0 deletions

5
cargo_config Normal file
View File

@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

BIN
libcst-0.4.9.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

17
remove-ufmt-dep.patch Normal file
View File

@ -0,0 +1,17 @@
Index: libcst-0.4.9/libcst/codegen/generate.py
===================================================================
--- libcst-0.4.9.orig/libcst/codegen/generate.py
+++ libcst-0.4.9/libcst/codegen/generate.py
@@ -25,8 +25,10 @@ from libcst.codegen.transforms import (
def format_file(fname: str) -> None:
- with open(os.devnull, "w") as devnull:
- subprocess.check_call(["ufmt", "format", fname], stdout=devnull, stderr=devnull)
+ # Do not format to avoid ufmt dependency that's not yet in opensuse
+ pass
+ # with open(os.devnull, "w") as devnull:
+ # subprocess.check_call(["ufmt", "format", fname], stdout=devnull, stderr=devnull)
def clean_generated_code(code: str) -> str:

36
replace-python-call.patch Normal file
View File

@ -0,0 +1,36 @@
---
libcst/codegen/generate.py | 2 +-
libcst/codemod/tests/test_codemod_cli.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/libcst/codegen/generate.py
+++ b/libcst/codegen/generate.py
@@ -69,7 +69,7 @@ def codegen_visitors() -> None:
# by attempting to run codegen again in a new process.
with open(os.devnull, "w") as devnull:
subprocess.check_call(
- ["python3", "-m", "libcst.codegen.gen_visitor_functions"],
+ [sys.executable, "-m", "libcst.codegen.gen_visitor_functions"],
cwd=base,
stdout=devnull,
)
--- a/libcst/codemod/tests/test_codemod_cli.py
+++ b/libcst/codemod/tests/test_codemod_cli.py
@@ -4,7 +4,7 @@
# LICENSE file in the root directory of this source tree.
#
-
+import sys
import subprocess
from pathlib import Path
@@ -16,7 +16,7 @@ class TestCodemodCLI(UnitTest):
def test_codemod_formatter_error_input(self) -> None:
rlt = subprocess.run(
[
- "python",
+ sys.executable,
"-m",
"libcst.tool",
"codemod",

BIN
vendor.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.