Group :: Development/Python3
RPM: python3-module-libcst
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: python3-module-libcst-0.4.7-alt.patch
Download
Download
.cargo/config.toml | 13 ++++++++++++-
libcst/tests/test_fuzz.py | 7 ++++++-
libcst/tests/test_pyre_integration.py | 4 ++++
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 59c989e6..aea231e5 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -8,4 +8,15 @@ 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."https://github.com/kevinmehall/rust-peg"]
+git = "https://github.com/kevinmehall/rust-peg"
+rev = "4b146b4b78a80c07e43d7ace2d97f65bfde279a8"
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "vendor"
diff --git a/libcst/tests/test_fuzz.py b/libcst/tests/test_fuzz.py
index 66b32276..20182582 100644
--- a/libcst/tests/test_fuzz.py
+++ b/libcst/tests/test_fuzz.py
@@ -16,7 +16,12 @@ import unittest
from datetime import timedelta
import hypothesis
-from hypothesmith import from_grammar
+
+# not packaged yet
+try:
+ from hypothesmith import from_grammar
+except ImportError:
+ raise unittest.SkipTest("Requires hypothesmith package")
import libcst
diff --git a/libcst/tests/test_pyre_integration.py b/libcst/tests/test_pyre_integration.py
index 021385af..76a48ee6 100644
--- a/libcst/tests/test_pyre_integration.py
+++ b/libcst/tests/test_pyre_integration.py
@@ -8,6 +8,10 @@ import json
import os
from pathlib import Path
from typing import Dict, List, Mapping, Optional, Tuple, Union
+from unittest import SkipTest
+
+if os.environ.get("NO_PYRE") is not None:
+ raise SkipTest("Requires pyre-check")
import libcst as cst
from libcst.metadata import MetadataWrapper, PositionProvider