Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Unified Diff: vpython/venv/system_windows.go

Issue 2699063004: vpython: Add VirtualEnv creation package. (Closed)
Patch Set: bootstrap straight out of tempdir Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vpython/venv/system_posix.go ('k') | vpython/venv/test_data/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/venv/system_windows.go
diff --git a/vpython/venv/system_windows.go b/vpython/venv/system_windows.go
new file mode 100644
index 0000000000000000000000000000000000000000..e4e7121fce0233f9443de41fdbcabff19603758a
--- /dev/null
+++ b/vpython/venv/system_windows.go
@@ -0,0 +1,36 @@
+// Copyright 2017 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package venv
+
+import (
+ "os"
+ "path/filepath"
+ "syscall"
+
+ "github.com/luci/luci-go/common/errors"
+)
+
+// longestGeneratedScriptPath returns the path of the longest generated script
+// given a VirtualEnv root.
+//
+// Since Windows doesn't generate scripts, this is disabled.
+func longestGeneratedScriptPath(basedir string) string { return "" }
+
+// venvBinPath resolves the path to a VirtualEnv binary.
+func venvBinPath(root, name string) string {
+ return filepath.Join(root, "Scripts", name)
+}
+
+func checkProcessRunning(pid int) error {
+ proc, err := os.FindProcess(pid)
+ if err != nil {
+ return errors.Annotate(err).Reason("failed to find process").Err()
+ }
+
+ if err := proc.Signal(os.Signal(syscall.Signal(0))); err != nil {
+ return errors.Annotate(err).Reason("failed to signal process").Err()
+ }
+ return nil
+}
« no previous file with comments | « vpython/venv/system_posix.go ('k') | vpython/venv/test_data/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698