2 # Copyright 2010 United States Government as represented by the
3 # Administrator of the National Aeronautics and Space Administration.
6 # Copyright 2010 OpenStack Foundation.
7 # Copyright 2013 IBM Corp.
9 # Licensed under the Apache License, Version 2.0 (the "License"); you may
10 # not use this file except in compliance with the License. You may obtain
11 # a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18 # License for the specific language governing permissions and limitations
22 Installation script for Neutron's development virtualenv
24 from __future__ import print_function
29 import install_venv_common as install_venv
34 Neutron development environment setup is complete.
36 Neutron development uses virtualenv to track and manage Python dependencies
37 while in development and testing.
39 To activate the Neutron virtualenv for the extent of your current shell
42 $ source .venv/bin/activate
44 Or, if you prefer, you can run commands in the virtualenv on a case by case
47 $ tools/with_venv.sh <your command>
49 Also, make test will automatically use the virtualenv.
55 root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
56 venv = os.path.join(root, '.venv')
57 pip_requires = os.path.join(root, 'requirements.txt')
58 test_requires = os.path.join(root, 'test-requirements.txt')
59 py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
61 install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
63 options = install.parse_args(argv)
64 install.check_python_version()
65 install.check_dependencies()
66 install.create_virtualenv(no_site_packages=options.no_site_packages)
67 install.install_dependencies()
71 if __name__ == '__main__':