blob: 1154e66fb7f966dc5064f99c8929d0c1e7eeae4d [file] [log] [blame]
[email protected]9af13ce2010-09-16 21:45:481// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef NET_TEST_PYTHON_UTILS_H_
6#define NET_TEST_PYTHON_UTILS_H_
[email protected]9af13ce2010-09-16 21:45:487
David Benjamin76ee79eb2019-03-15 17:02:098#include <vector>
9
[email protected]9af13ce2010-09-16 21:45:4810#include "base/compiler_specific.h"
David Benjamin76ee79eb2019-03-15 17:02:0911#include "base/environment.h"
[email protected]9af13ce2010-09-16 21:45:4812
[email protected]a3ef4832013-02-02 05:12:3313namespace base {
[email protected]2f3b1cc2014-03-17 23:07:1514class CommandLine;
[email protected]9af13ce2010-09-16 21:45:4815class FilePath;
[email protected]a3ef4832013-02-02 05:12:3316}
[email protected]9af13ce2010-09-16 21:45:4817
David Benjamin76ee79eb2019-03-15 17:02:0918// Modifies |map| to use the specified Python path.
19void SetPythonPathInEnvironment(const std::vector<base::FilePath>& python_path,
20 base::EnvironmentMap* map);
[email protected]9af13ce2010-09-16 21:45:4821
[email protected]813e9cd12010-11-09 21:49:4022// Return the location of the compiler-generated python protobuf.
[email protected]a3ef4832013-02-02 05:12:3323bool GetPyProtoPath(base::FilePath* dir);
[email protected]813e9cd12010-11-09 21:49:4024
mbjorge49e774102016-11-28 22:31:2325// Returns if a virtualenv is currently active.
26bool IsInPythonVirtualEnv();
27
[email protected]2bbc7f22012-09-12 21:53:1528// Returns the command that should be used to launch Python.
[email protected]2f3b1cc2014-03-17 23:07:1529bool GetPythonCommand(base::CommandLine* python_cmd) WARN_UNUSED_RESULT;
[email protected]9af13ce2010-09-16 21:45:4830
31#endif // NET_TEST_PYTHON_UTILS_H_