mirror of
https://github.com/ceph/ceph
synced 2025-01-08 20:21:33 +00:00
b030d8fc11
When make all runs in the ceph-detect-init module, it does a "setup.py build" which is not used. Replace it with a python setup.py install in a virtualenv so that tests can add the virtualenv/bin to their PATH and call ceph-detect-init from sources as they would if it was installed. Part of run-tox.sh is moved to tools/setup-virtualenv.sh so that it can be re-used by ceph-disk and other python modules. Signed-off-by: Loic Dachary <loic@dachary.org>
32 lines
1.2 KiB
Bash
Executable File
32 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (C) 2016 <contact@redhat.com>
|
|
#
|
|
# Author: Loic Dachary <loic@dachary.org>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU Library Public License as published by
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
# any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Library Public License for more details.
|
|
#
|
|
|
|
rm -fr virtualenv
|
|
virtualenv virtualenv
|
|
. virtualenv/bin/activate
|
|
# older versions of pip will not install wrap_console scripts
|
|
# when using wheel packages
|
|
pip --log virtualenv/log.txt install --upgrade 'pip >= 6.1'
|
|
if test -d wheelhouse ; then
|
|
export NO_INDEX=--no-index
|
|
fi
|
|
pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse --upgrade distribute
|
|
pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9'
|
|
if test -f requirements.txt ; then
|
|
pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse -r requirements.txt
|
|
fi
|