summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2018-03-07 07:58:45 +0100
committerBrianna Poulos <Brianna.Poulos@jhuapl.edu>2018-05-30 11:36:04 -0400
commita17eb51430a63851d9cccde71c316166d00468de (patch)
tree4e44e748d6c01f868d0a35d91df741421e08d511
parentbbcebe522f1366791aca78475770515c3eed4d39 (diff)
Avoid tox-install.sh
Instead of using tox-install.sh, we can install horizon now directly from pypi - or use the current branch in CI system using tox-siblings. Create doc/requriements.txt for doc requirements as well. Update tox.ini for this change and add horizon to requirements file. Change-Id: I35fb782b7bad4c046930926c43b0f7b3c1bb07b7
Notes
Notes (review): Code-Review+2: Brianna Poulos <Brianna.Poulos@jhuapl.edu> Workflow+1: Brianna Poulos <Brianna.Poulos@jhuapl.edu> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 30 May 2018 16:00:05 +0000 Reviewed-on: https://review.openstack.org/550364 Project: openstack/castellan-ui Branch: refs/heads/master
-rw-r--r--doc/requirements.txt9
-rw-r--r--requirements.txt2
-rw-r--r--test-requirements.txt5
-rwxr-xr-xtools/tox_install.sh65
-rw-r--r--tox.ini17
5 files changed, 21 insertions, 77 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..ecad8ba
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,9 @@
1openstackdocstheme>=1.16.0 # Apache-2.0
2reno # Apache-2.0
3sphinx>=1.6.2 # BSD
4
5# Needed for building docs
6django-nose>=1.4.4 # BSD
7mock>=2.0 # BSD
8mox3 # Apache-2.0
9horizon>=13.0.0 # Apache-2.0
diff --git a/requirements.txt b/requirements.txt
index 9ecc399..98fa479 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,6 +12,6 @@ Babel>=2.3.4,!=2.4.0 # BSD
12Django>=1.8,<2.0 # BSD 12Django>=1.8,<2.0 # BSD
13django-babel>=0.5.1 # BSD 13django-babel>=0.5.1 # BSD
14django_compressor>=2.0 # MIT 14django_compressor>=2.0 # MIT
15django_openstack_auth>=3.5.0 # Apache-2.0
16django-pyscss>=2.0.2 # BSD License (2 clause) 15django-pyscss>=2.0.2 # BSD License (2 clause)
17castellan>=0.7.0 # Apache-2.0 16castellan>=0.7.0 # Apache-2.0
17horizon>=13.0.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index d3db44c..bd443e0 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -12,17 +12,14 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
12coverage>=4.0,!=4.4 # Apache-2.0 12coverage>=4.0,!=4.4 # Apache-2.0
13django-nose>=1.4.4 # BSD 13django-nose>=1.4.4 # BSD
14mock>=2.0 # BSD 14mock>=2.0 # BSD
15mox3>=0.7.0,!=0.19.0 # Apache-2.0 15mox3 # Apache-2.0
16nodeenv>=0.9.4 # BSD 16nodeenv>=0.9.4 # BSD
17nose # LGPL 17nose # LGPL
18nose-exclude # LGPL 18nose-exclude # LGPL
19nosehtmloutput>=0.0.3 # Apache-2.0 19nosehtmloutput>=0.0.3 # Apache-2.0
20nosexcover # BSD 20nosexcover # BSD
21openstack.nose_plugin>=0.7 # Apache-2.0 21openstack.nose_plugin>=0.7 # Apache-2.0
22openstackdocstheme>=1.16.0 # Apache-2.0
23reno>=1.8.0,!=2.3.1 # Apache-2.0
24selenium>=2.50.1 # Apache-2.0 22selenium>=2.50.1 # Apache-2.0
25sphinx>=1.6.2 # BSD
26testtools>=1.4.0 # MIT 23testtools>=1.4.0 # MIT
27# This also needs xvfb library installed on your OS 24# This also needs xvfb library installed on your OS
28xvfbwrapper>=0.1.3 #license: MIT 25xvfbwrapper>=0.1.3 #license: MIT
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index 7890956..0000000
--- a/tools/tox_install.sh
+++ /dev/null
@@ -1,65 +0,0 @@
1#!/usr/bin/env bash
2
3# Many of neutron's repos suffer from the problem of depending on neutron,
4# but it not existing on pypi.
5
6# This wrapper for tox's package installer will use the existing package
7# if it exists, else use zuul-cloner if that program exists, else grab it
8# from neutron master via a hard-coded URL. That last case should only
9# happen with devs running unit tests locally.
10
11# From the tox.ini config page:
12# install_command=ARGV
13# default:
14# pip install {opts} {packages}
15
16ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
17BRANCH_NAME=master
18GIT_BASE=${GIT_BASE:-https://git.openstack.org/}
19
20install_project() {
21 local project=$1
22 local branch=${2:-$BRANCH_NAME}
23 local module_name=${project//-/_}
24
25 set +e
26 project_installed=$(echo "import $module_name" | python 2>/dev/null ; echo $?)
27 set -e
28
29 if [ $project_installed -eq 0 ]; then
30 echo "ALREADY INSTALLED" > /tmp/tox_install.txt
31 echo "$project already installed; using existing package"
32 elif [ -x "$ZUUL_CLONER" ]; then
33 echo "ZUUL CLONER" > /tmp/tox_install.txt
34 # Make this relative to current working directory so that
35 # git clean can remove it. We cannot remove the directory directly
36 # since it is referenced after $install_cmd -e
37 mkdir -p .tmp
38 PROJECT_DIR=$(/bin/mktemp -d -p $(pwd)/.tmp)
39 pushd $PROJECT_DIR
40 $ZUUL_CLONER --cache-dir \
41 /opt/git \
42 --branch $branch \
43 http://git.openstack.org \
44 openstack/$project
45 cd openstack/$project
46 $install_cmd -e .
47 popd
48 else
49 echo "PIP HARDCODE" > /tmp/tox_install.txt
50 local GIT_REPO="$GIT_BASE/openstack/$project"
51 SRC_DIR="$VIRTUAL_ENV/src/$project"
52 git clone --depth 1 --branch $branch $GIT_REPO $SRC_DIR
53 $install_cmd -U -e $SRC_DIR
54 fi
55}
56
57set -e
58
59install_cmd="pip install -c$1"
60shift
61
62install_project horizon
63
64$install_cmd -U $*
65exit $?
diff --git a/tox.ini b/tox.ini
index 04a17d4..147ffdc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,16 +5,14 @@ skipsdist = True
5 5
6[testenv] 6[testenv]
7usedevelop = True 7usedevelop = True
8setenv = VIRTUAL_ENV={envdir} 8setenv = NOSE_WITH_OPENSTACK=1
9 BRANCH_NAME=master
10 CLIENT_NAME=castellan-ui
11 NOSE_WITH_OPENSTACK=1
12 NOSE_OPENSTACK_COLOR=1 9 NOSE_OPENSTACK_COLOR=1
13 NOSE_OPENSTACK_RED=0.05 10 NOSE_OPENSTACK_RED=0.05
14 NOSE_OPENSTACK_YELLOW=0.025 11 NOSE_OPENSTACK_YELLOW=0.025
15 NOSE_OPENSTACK_SHOW_ELAPSED=1 12 NOSE_OPENSTACK_SHOW_ELAPSED=1
16install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} 13install_command = pip install -U {opts} {packages}
17deps = -r{toxinidir}/requirements.txt 14deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
15 -r{toxinidir}/requirements.txt
18 -r{toxinidir}/test-requirements.txt 16 -r{toxinidir}/test-requirements.txt
19commands = python manage.py test {posargs} --settings=castellan_ui.test.settings 17commands = python manage.py test {posargs} --settings=castellan_ui.test.settings
20 18
@@ -58,9 +56,14 @@ commands =
58 echo "nexecute `npm run test`" 56 echo "nexecute `npm run test`"
59 57
60[testenv:docs] 58[testenv:docs]
61commands = python setup.py build_sphinx 59deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
60 -r{toxinidir}/requirements.txt
61 -r{toxinidir}/doc/requirements.txt
62commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
62 63
63[testenv:releasenotes] 64[testenv:releasenotes]
65deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
66 -r{toxinidir}/doc/requirements.txt
64commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 67commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
65 68
66[flake8] 69[flake8]