Browse Source

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
Andreas Jaeger 1 year ago
parent
commit
a17eb51430
5 changed files with 21 additions and 77 deletions
  1. 9
    0
      doc/requirements.txt
  2. 1
    1
      requirements.txt
  3. 1
    4
      test-requirements.txt
  4. 0
    65
      tools/tox_install.sh
  5. 10
    7
      tox.ini

+ 9
- 0
doc/requirements.txt View File

@@ -0,0 +1,9 @@
1
+openstackdocstheme>=1.16.0 # Apache-2.0
2
+reno # Apache-2.0
3
+sphinx>=1.6.2  # BSD
4
+
5
+# Needed for building docs
6
+django-nose>=1.4.4  # BSD
7
+mock>=2.0 # BSD
8
+mox3 # Apache-2.0
9
+horizon>=13.0.0  # Apache-2.0

+ 1
- 1
requirements.txt View File

@@ -12,6 +12,6 @@ Babel>=2.3.4,!=2.4.0  # BSD
12 12
 Django>=1.8,<2.0  # BSD
13 13
 django-babel>=0.5.1  # BSD
14 14
 django_compressor>=2.0  # MIT
15
-django_openstack_auth>=3.5.0  # Apache-2.0
16 15
 django-pyscss>=2.0.2 # BSD License (2 clause)
17 16
 castellan>=0.7.0 # Apache-2.0
17
+horizon>=13.0.0  # Apache-2.0

+ 1
- 4
test-requirements.txt View File

@@ -12,17 +12,14 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
12 12
 coverage>=4.0,!=4.4  # Apache-2.0
13 13
 django-nose>=1.4.4  # BSD
14 14
 mock>=2.0 # BSD
15
-mox3>=0.7.0,!=0.19.0  # Apache-2.0
15
+mox3 # Apache-2.0
16 16
 nodeenv>=0.9.4 # BSD
17 17
 nose # LGPL
18 18
 nose-exclude # LGPL
19 19
 nosehtmloutput>=0.0.3 # Apache-2.0
20 20
 nosexcover # BSD
21 21
 openstack.nose_plugin>=0.7  # Apache-2.0
22
-openstackdocstheme>=1.16.0 # Apache-2.0
23
-reno>=1.8.0,!=2.3.1  # Apache-2.0
24 22
 selenium>=2.50.1 # Apache-2.0
25
-sphinx>=1.6.2  # BSD
26 23
 testtools>=1.4.0 # MIT
27 24
 # This also needs xvfb library installed on your OS
28 25
 xvfbwrapper>=0.1.3 #license: MIT

+ 0
- 65
tools/tox_install.sh View File

@@ -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
-
16
-ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
17
-BRANCH_NAME=master
18
-GIT_BASE=${GIT_BASE:-https://git.openstack.org/}
19
-
20
-install_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
-
57
-set -e
58
-
59
-install_cmd="pip install -c$1"
60
-shift
61
-
62
-install_project horizon
63
-
64
-$install_cmd -U $*
65
-exit $?

+ 10
- 7
tox.ini View File

@@ -5,16 +5,14 @@ skipsdist = True
5 5
 
6 6
 [testenv]
7 7
 usedevelop = True
8
-setenv = VIRTUAL_ENV={envdir}
9
-         BRANCH_NAME=master
10
-         CLIENT_NAME=castellan-ui
11
-         NOSE_WITH_OPENSTACK=1
8
+setenv = NOSE_WITH_OPENSTACK=1
12 9
          NOSE_OPENSTACK_COLOR=1
13 10
          NOSE_OPENSTACK_RED=0.05
14 11
          NOSE_OPENSTACK_YELLOW=0.025
15 12
          NOSE_OPENSTACK_SHOW_ELAPSED=1
16
-install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
17
-deps = -r{toxinidir}/requirements.txt
13
+install_command = pip install -U {opts} {packages}
14
+deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
15
+       -r{toxinidir}/requirements.txt
18 16
        -r{toxinidir}/test-requirements.txt
19 17
 commands = python manage.py test {posargs} --settings=castellan_ui.test.settings
20 18
 
@@ -58,9 +56,14 @@ commands =
58 56
   echo "nexecute `npm run test`"
59 57
 
60 58
 [testenv:docs]
61
-commands = python setup.py build_sphinx
59
+deps = -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
62
+commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
62 63
 
63 64
 [testenv:releasenotes]
65
+deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
66
+       -r{toxinidir}/doc/requirements.txt
64 67
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
65 68
 
66 69
 [flake8]

Loading…
Cancel
Save