From 1a479b6ecd958f6bc74d777922898a3d4fb544b2 Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Tue, 15 May 2018 17:13:38 -0700 Subject: [PATCH] Allow "-" to be part of Python file names Test: m -j py-setuptools Bug: b/79751992 Change-Id: I4cd0cf8671a9bb912a8ba819265274ab0c9e0074 --- python/python.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/python.go b/python/python.go index 65e3efd48..6d6ac27ba 100644 --- a/python/python.go +++ b/python/python.go @@ -206,7 +206,7 @@ type dependencyTag struct { var ( pythonLibTag = dependencyTag{name: "pythonLib"} launcherTag = dependencyTag{name: "launcher"} - pyIdentifierRegexp = regexp.MustCompile(`^([a-z]|[A-Z]|_)([a-z]|[A-Z]|[0-9]|_)*$`) + pyIdentifierRegexp = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_-]*$`) pyExt = ".py" protoExt = ".proto" pyVersion2 = "PY2"