Commit Graph

17 Commits

Author SHA1 Message Date
Ian Wienand 4143ce6fc9 Create virtualenv with abstracted VIRTUALENV_CMD
Just calling "virtualenv" makes a Python 2 based environment;
setuptools just dropped Python 2 support (as Python 2 reached EOL in
Jan 2020) so this has now become a breakage.

Although the Python 2 path won't work, use the abstracted command.
This should stop us having to revisit this for any future cleanups (or
switing to venv, etc).

Change-Id: I531e971b78491a9276753c0d86b04c4adbd224aa
2020-01-13 16:05:11 +11:00
Ian Wienand 523f488036 Namespace XTRACE commands
I noticed this when debugging some grenade issues failures.

An include of grenade/functions stores the current value of XTRACE
(on) and disables xtrace for the rest of the import.

We then include devstack's "functions" library, which now overwrites
the stored value of XTRACE the current state; i.e. disabled.

When it finishes it restores the prior state (disabled), and then
grenade restores the same value of XTRACE (disabled).

The result is that xtrace is incorrectly disabled until the next time
it just happens to be turned on.

The solution is to name-space the store of the current-value of xtrace
so when we finish sourcing a file, we always restore the tracing value
to what it was when we entered.

Some files had already discovered this.  In general there is
inconsistency around the setting of the variable, and a lot of obvious
copy-paste.  This brings consistency across all files by using
_XTRACE_* prefixes for the sotre/restore of tracing values.

Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
2015-11-27 15:36:04 +11:00
Sean Dague 2105b9f9ce move back to editable install for oslo
Now that we don't have namespace packages any more, editable installs
should be fine. This also means that we apply constraints to these
libraries during installation, which is important for future testing.

This is needed in order to be able to easily sanity check
LIBS_FROM_GIT, as then all libs installed from git will have pip urls
with git in them.

Change-Id: I46c3b8f943b97f912eccc7278e3e033ae67e7e31
2015-09-11 06:59:29 -04:00
Clark Boylan 05aa3846a0 Just use constraints everywhere
Having behavior on your laptop diverge from behavior in the gate is
confusing. Just use constraints on every devstack run to be consistent.
Users of devstack can edit the requirements repo in order to change
these constraints locally if necessary.

Change-Id: I843208e2e982eb04931b76f5cb4bd219fbcd70de
2015-08-18 09:39:04 -07:00
Clark Boylan 57aafb5a9a Clone reqs repo prior to using pip constraints
We pull the pip constraints from the requirements repo so need to clone
that repo prior to using the constraints. In fixup_stuff.sh devstack
attempts to install packages like prettytable using the constraints. It
is also possible to need constraints before fixup_stuff.sh if tracking
depends. To deal with this clone requirements repo before any possible
use of constraints in pip_install.

Change-Id: I42e981c8c5ce1b8a57b9f6cce213065c72d6af11
2015-08-03 10:42:48 -07:00
Robert Collins 7ebe8e0751 Don't install pbr in a venv
Because PIP_VIRTUAL_ENV was set for the installation of requirements,
and left around in scope, the installation of pbr no longer happened
in a global context, it instead landed inside the virtual
env. Unsetting the variable after requirements install gets us back to
where we expect.

This was an unintended side effect of the requirements-venv patch.

Change-Id: I2c4cb4305fec81a5fd237edabee78874ccd0da22
2015-06-23 06:31:02 -04:00
Robert Collins 86923559a4 Fixup pbr in LIBS_FROM_GIT
Change-Id: I32594f30a13c0757cc918c8a5e54ae182e985693
2015-06-19 11:17:04 +12:00
Robert Collins 40f3e33f73 Put requirements repo in a venv.
This is to prevent any possible contamination of test results from its
presence.

Change-Id: I5a929854745650cc6a182ffc4d15c50caabdd727
2015-06-19 08:04:00 +12:00
Robert Collins f553ce24ea Actually install the requirements repo.
The requirements repo has had a setup.cfg etc for a long time but only
recently started using it. As it now has dependencies, we need to pip
install it. To preserve compat with older requirements repos I haven't
changed the call to invoke update-requirements yet, as we still have
the update.py symlink.

The pbr install is moved before requirements to ensure we don't
trigger easy-install.

Change-Id: I7d7e91694c9145fac0ddab8a9de5f789d723c641
2015-06-18 11:21:42 +12:00
Clark Boylan 013f52b015 Always install latest pbr
When not installing pbr from source always install the latest version of
pbr. It turns out that python-pbr is a system package that satisfies
many of our requirements files pbr requirements but breaks under
setuptools 8.0. Fix this by passing the -U flag to pip when installing
pbr so that we install the latest version of pbr always.

Note that we likely need to make this more generic to avoid other system
package leakage when installing packages not from source.

We should also probably bump our pbr requirements across the board to
reflect the new setuptools 8.0 world needs.

Change-Id: I23dd21cea37d26f879aa8d864ee7d371e70221ea
Fixes-bug: 1405318
2014-12-23 17:20:30 -08:00
Sean Dague e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
Sean Dague cc52406a78 use released library versions by default
This patch provides a new path for installing libraries in devstack so
that it's possible to either test with upstream released libraries, or
with git versions of individual libraries.

Libraries are added by name to 3 associative arrays GITREPO,
GITBRANCH, GITDIR. When we get to the library install phase we inspect
LIBS_FROM_GIT and look for libraries by name (i.e. "oslo.config") and
if they exist we'll clone and install those libraries from
git. Otherwise we won't, and just let pip pull them as dependencies
when it needs them.

This patch provides the conversion of the oslo libraries, including
pbr.

Devstack-gate jobs for these libraries will need to change to support
actually forward testing their content.

Change-Id: I6161fa3194dbe8fbc25b6ee0e2fe3cc722a1cea4
2014-10-01 16:20:22 -04:00
Monty Taylor 72ab17b830 Remove unfubar_setuptools
It is no longer used for anything, nor does it seem to be
needed in the modern world of get-pip.py.

Change-Id: I5554514dd862a2004454daf295abbcf9cf9f2bfb
2014-07-17 05:56:59 +02:00
Sean Dague 099e5e3f81 don't use pip -e install for libraries
libraries in openstack shouldn't be installed editable, as it
causes all manner of issues (especially complicated by the use
of namespace packages). Install these globally as part of the
devstack installation process.

Change-Id: I11acb169e74069be0618e57496ff342f9e788493
2014-04-01 08:48:00 -04:00
Ian Wienand aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Adam Spiers 6a5aa7c6a2 Fix some Markdown formatting issues
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.

Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
2013-10-24 17:38:19 +01:00
Sean Dague 0392a10a63 add lib/infra
move the infrastructure projects to a dedicated lib/infra, which
gives us access to this during grenade upgrade tests.

Change-Id: I1e832792b61d41ad290b4b2ab26fe664e710cebd
2013-07-31 15:48:47 -04:00