17 Commits

Author SHA1 Message Date
Jenkins
c3fd0b5298 Merge "make get-pip.py download failures more clear" 2014-06-10 15:16:04 +00:00
Mathieu Gagné
76ed427ca1 Update setuptools to latest for .dist-info support
Support for .dist-info directories was added in setuptools 0.6.28.

At this moment, Ubuntu Precise 12.04 provides setuptools 0.6.24
which is too old for our needs.

Six is installed from wheel which uses the .dist-info directory.
For six to be found, we need to install setuptools >= 0.6.28.

Updating setuptools to the latest version using pip will provide use
the needed version to make six discoverable.

Closes-bug: #1326811
Change-Id: I761d0aeb2b8b593cee38d512afc8fed6a2d1fe37
2014-06-05 18:11:16 -04:00
Sean Dague
f625ffe24f make get-pip.py download failures more clear
curl dying ends up being a really unclear failure condition, and
hard to fingerprint in the gate. We should make this much more
explicit when we die.

Also, don't trust the upstream filename, because all the rest of
our logic would break if it changes anyway.

Change-Id: Ibc2a96b33471d24c597af0d7af896fb10523156f
2014-06-05 14:01:56 +00:00
Sean Dague
7b63c5ec9e be opinionated: only use get-pip.py
get-pip.py is now on a CDN, and is the prefered way to get pip.

Remove the default path of using pip tarballs from pypi and use
get-pip.py on from here on.

Closes-Bug: #1326539

Change-Id: I0661f7c6913ba6b3e1d00b30e22740d150bfd060
2014-06-04 22:53:25 +00:00
Sean Dague
33ff33b1fb cache the pip tarball
there is no need to download the pip tarball over and over again
on rerun. Use the cached value.

Change-Id: Ibcc1807ba2aca062f69839212f05ac9394db9448
2014-03-28 15:14:56 -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
KIYOHIRO ADACHI
a515a70e2b Fixed check method of $USE_GET_PIP
'[[ -n "$USE_GET_PIP" ]]' always TRUE
because $USE_GET_PIP is '0' or '1'.

Change-Id: I73c4c6befe2126882ef21991b2a3fe712b2ac388
Closes-Bug: #1259824
2013-12-11 16:14:00 +09:00
sbauza
a49422e33e Fix install_get_pip in order to work behind a proxy
Proxy envvars are not passed to pip when sudo, we need to export
them.

Change-Id: I67622f5ea8ecb948006e032bdc395ecf36914146
Closes-Bug: #1258155
2013-12-05 14:56:14 +01:00
Monty Taylor
480309eea5 Allow overriding USE_GET_PIP via env vars
devstack-gate wants to pre-cache and then use get-pip, but we can't
throw the flag currently. Make the flag default settable via env vars.

Change-Id: I661b52670b6ce494666cbdd611e4eee6b96c8321
Partial-Bug: #1254275
2013-11-25 10:20:04 -05:00
DennyZhang
3931573f2b mute useless console output, when run ./stack.sh
Run ./stack.sh will dump ~400 lines of information, because of
tar xvfz pip-*.tar.gz, and python setup.py install.

We'd better mute stdout for the two steps, to make console cleaner

Change-Id: Icf87947e020acb48d8cbe4cdcc1641f060e50f6d
2013-10-11 00:12:30 -05:00
Attila Fazekas
46ea723868 install_pip script fails if pip was not installed
'set -o errexit' recently added to the pip installer script, which causes
the script fail when it does not able to find an already installed pip.

This change handles the situation when pip is not installed.

Change-Id: I18a42d13c4be6699db21ec5b6a095a88a199912d
2013-10-07 07:32:58 +02:00
Adam Spiers
c85ade7720 set errexit and xtrace in helper scripts
stack.sh invokes some helper scripts as separate processes, rather than
by source'ing them.  As with stack.sh itself, abort immediately on the
first error, so that errors don't compound and result in confusing error
messages.  If one of these helper scripts aborts, stack.sh itself will
also abort in the usual manner.

Due to the change in behaviour, tweak some mv invocations to ensure that
they don't trigger false failures.

As with stack.sh itself, also enable xtrace so we can see exactly what's
happening.  In particular this allows us to see the cause of any
premature termination due to a command failing whilst errexit is
enabled.

Change-Id: I7a55784c31e5395e29ab9bbe2bb112b83b9be693
2013-10-01 17:54:40 +01:00
Jenkins
7ab1f22c60 Merge "Stop doing special things with setuptools" 2013-09-13 11:27:59 +00:00
Chmouel Boudjnah
5917868e75 Use 1.4.1 of pip.
- This is where the option pip install --pre is.

Change-Id: I3f836a701f17a4fea888ec51da62e7137cf0e6db
2013-09-06 16:14:17 +02:00
Monty Taylor
dace92f557 Stop doing special things with setuptools
pip 1.4 can handle the distribute/setuptools upgrade sequencing
appropriate. So it turns out all we need to upgrade is pip, and then the
rest will fall in to place. This will still not fix the packages vs. pip
interactions, but we don't to muck with the system setuptools packages
at all.

Change-Id: I99220ccc190798c3eb77bb2361abc6606bd546b4
2013-08-11 00:03:10 -03:00
Dean Troyer
9acc12a392 More Python package fixes
* Add tools/fixup_stuff.sh to fix prettytable and httplib2 install
  with pip 1.4+
* Cache downloads properly in tools/install_pip.sh

Change-Id: I482590cb91f7a10c1436bc9015afd572ac1cc73e
2013-08-10 16:44:17 -07:00
Dean Troyer
62d1d698a0 Add tools/install_pip.sh
Install a known working recent version of pip that handles installation
dependencies more correctly than before.  Extract to a separate script
so it can be used apart from stack.sh.

* Install distro setuptools if it not already present
* Install pip from source tarball as get-pip.py proved to be unreliable
* Remove python-distribute and python-pip from all prereq files,
  move python-setuptools to 'general'
* Remove the earlier unfubar_setuptppls() call that attenpted to fix this
* Only update requirements.txt when no changes in repo

Tested on Precise, F18 and CentOS6.
* Fedora and RHEL allow pip to install packages ON TOP OF RPM-installed
  packages.  THIS IS BROKEN.  And is one reason we have to be so picky
  about order and so forth.

Change-Id: Ibb4b42119dc2e51577c77bbbbffb110863e5324d
2013-08-07 20:28:56 -05:00