diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 000000000000..524b30732ec3 --- /dev/null +++ b/bindep.txt @@ -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] diff --git a/doc/source/development.environment.rst b/doc/source/development.environment.rst index 0b515601be67..fa4b5e578910 100644 --- a/doc/source/development.environment.rst +++ b/doc/source/development.environment.rst @@ -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 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 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 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 ========================== diff --git a/tox.ini b/tox.ini index 38ff8295b3ac..6328399c0f68 100644 --- a/tox.ini +++ b/tox.ini @@ -133,3 +133,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