List system dependencies for running common tests
Add a bindep.txt file containing a cross-platform list of dependencies needed for running included tox-based tests. Also include a tox environment for convenience calling the bindep[*] utility to list any missing system requirements, and simplify the contributor documentation to recommend this rather than embedding an ad-hoc list of package names in an untestable document. This change is self-testing. [*] http://docs.openstack.org/infra/bindep/ Change-Id: I7c18b0921c39b99df89f2c356208303c2bad5a97
This commit is contained in:
parent
21312bf877
commit
7cdd5da7d7
34
bindep.txt
Normal file
34
bindep.txt
Normal file
@ -0,0 +1,34 @@
|
||||
# This is a cross-platform list tracking distribution packages needed for install and tests;
|
||||
# see http://docs.openstack.org/infra/bindep/ for additional information.
|
||||
|
||||
build-essential [platform:dpkg test]
|
||||
gcc [platform:rpm test]
|
||||
gettext [test]
|
||||
graphviz [test]
|
||||
language-pack-en [platform:ubuntu]
|
||||
libffi-dev [platform:dpkg test]
|
||||
libffi-devel [platform:rpm test]
|
||||
libmysqlclient-dev [platform:dpkg]
|
||||
libpq-dev [platform:dpkg test]
|
||||
libsqlite3-dev [platform:dpkg test]
|
||||
libxml2-dev [platform:dpkg test]
|
||||
libxslt-devel [platform:rpm test]
|
||||
libxslt1-dev [platform:dpkg test]
|
||||
locales [platform:debian]
|
||||
mysql [platform:rpm]
|
||||
mysql-client [platform:dpkg]
|
||||
mysql-devel [platform:rpm test]
|
||||
mysql-server
|
||||
pkg-config [platform:dpkg test]
|
||||
pkgconfig [platform:rpm test]
|
||||
postgresql
|
||||
postgresql-client [platform:dpkg]
|
||||
postgresql-devel [platform:rpm test]
|
||||
postgresql-server [platform:rpm]
|
||||
python-dev [platform:dpkg test]
|
||||
python-devel [platform:rpm test]
|
||||
python3-all [platform:dpkg !platform:ubuntu-precise]
|
||||
python3-all-dev [platform:dpkg !platform:ubuntu-precise]
|
||||
python3-devel [platform:fedora]
|
||||
python34-devel [platform:centos]
|
||||
sqlite-devel [platform:rpm test]
|
@ -66,33 +66,51 @@ DevStack installs a complete OpenStack environment. Alternatively,
|
||||
you can explicitly install and clone just what you need for Nova
|
||||
development.
|
||||
|
||||
The first step of this process is to install the system (not Python)
|
||||
packages that are required. Following are instructions on how to do
|
||||
this on Linux and on the Mac.
|
||||
Getting the code
|
||||
````````````````
|
||||
|
||||
Grab the code from git::
|
||||
|
||||
git clone https://git.openstack.org/openstack/nova
|
||||
cd nova
|
||||
|
||||
|
||||
Linux Systems
|
||||
`````````````
|
||||
|
||||
The first step of this process is to install the system (not Python)
|
||||
packages that are required. Following are instructions on how to do
|
||||
this on Linux and on the Mac.
|
||||
|
||||
.. note::
|
||||
|
||||
This section is tested for Nova on Ubuntu (14.04-64) and
|
||||
Fedora-based (RHEL 6.1) distributions. Feel free to add notes and
|
||||
change according to your experiences or operating system.
|
||||
|
||||
Install the prerequisite packages.
|
||||
Install the prerequisite packages listed in the ``bindep.txt``
|
||||
file.
|
||||
|
||||
On Ubuntu::
|
||||
On Debian-based distributions (e.g., Debian/Mint/Ubuntu)::
|
||||
|
||||
sudo apt-get install python-dev libssl-dev python-pip git-core libxml2-dev libxslt-dev pkg-config libffi-dev libpq-dev libmysqlclient-dev graphviz libsqlite3-dev python-tox python3-dev python3 gettext
|
||||
sudo apt-get install python-pip
|
||||
sudo pip install tox
|
||||
tox -e bindep
|
||||
sudo apt-get install <indicated missing package names>
|
||||
|
||||
On Fedora-based distributions (e.g., Fedora/RHEL/CentOS/Scientific Linux)::
|
||||
|
||||
sudo yum install python-devel openssl-devel python-pip git gcc libxslt-devel mysql-devel postgresql-devel libffi-devel libvirt-devel graphviz sqlite-devel python3-devel python3 gettext
|
||||
sudo pip-python install tox
|
||||
sudo yum install python-pip
|
||||
sudo pip install tox
|
||||
tox -e bindep
|
||||
sudo yum install <indicated missing package names>
|
||||
|
||||
On openSUSE-based distributions (SLES 12, openSUSE Leap 42.1 or Tumbleweed)::
|
||||
|
||||
sudo zypper in gcc git libffi-devel libmysqlclient-devel libvirt-devel libxslt-devel postgresql-devel python-devel python-pip python-tox python-virtualenv python3-devel python3 gettext-runtime
|
||||
sudo zypper in python-pip
|
||||
sudo pip install tox
|
||||
tox -e bindep
|
||||
sudo zypper in <indicated missing package names>
|
||||
|
||||
|
||||
Mac OS X Systems
|
||||
@ -112,18 +130,6 @@ fine with nova. OpenSSL versions from brew like OpenSSL 1.0.1k work fine
|
||||
as well.
|
||||
|
||||
|
||||
Getting the code
|
||||
````````````````
|
||||
|
||||
Once you have the prerequisite system packages installed, the next
|
||||
step is to clone the code.
|
||||
|
||||
Grab the code from git::
|
||||
|
||||
git clone https://git.openstack.org/openstack/nova
|
||||
cd nova
|
||||
|
||||
|
||||
Building the Documentation
|
||||
==========================
|
||||
|
||||
|
11
tox.ini
11
tox.ini
@ -131,3 +131,14 @@ import_exceptions = nova.i18n
|
||||
# of the requirements.txt files
|
||||
deps = pip_missing_reqs
|
||||
commands=pip-missing-reqs -d --ignore-file=nova/tests/* --ignore-file=nova/test.py nova
|
||||
|
||||
[testenv:bindep]
|
||||
# Do not install any requirements. We want this to be fast and work even if
|
||||
# system dependencies are missing, since it's used to tell you what system
|
||||
# dependencies are missing! This also means that bindep must be installed
|
||||
# separately, outside of the requirements files, and develop mode disabled
|
||||
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
||||
# further relies on "tox.skipsdist = True" above).
|
||||
deps = bindep
|
||||
commands = bindep test
|
||||
usedevelop = False
|
||||
|
Loading…
Reference in New Issue
Block a user