summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-07-21 10:47:32 -0700
committerMonty Taylor <mordred@inaugust.com>2013-07-21 12:43:58 -0700
commit8e58c2fa58fd1aa6f9985dcb4e210508a73e1df7 (patch)
tree4b1dd4b873588a75f76a7d0ddc31a6f7a0a9132c /tools
parentc84876dc0f559a66fec19b2f81f5717204b253e2 (diff)
downloadpbr-8e58c2fa58fd1aa6f9985dcb4e210508a73e1df7.tar.gz
Replace entry_points console_scripts
The console scripts generated by entry_points are too complex for our needs and make things run slowly in service of a multi-version install that we don't use. Instead, install a simple script which just does a direct import. Change-Id: I1ec46837cea07db514f2fb6338c7bced34a83c4a
Diffstat (limited to 'tools')
-rw-r--r--tools/integration.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/tools/integration.sh b/tools/integration.sh
index 41a350d..ef0b2f3 100644
--- a/tools/integration.sh
+++ b/tools/integration.sh
@@ -90,6 +90,49 @@ extra-index-url = http://pypi.openstack.org/openstack
log = /home/jenkins/pip.log
EOF
+eptest=$tmpdir/eptest
+mkdir $eptest
+cd $eptest
+
+cat <<EOF > setup.cfg
+[metadata]
+name = test_project
+
+[entry_points]
+console_scripts =
+ test_cmd = test_project:main
+
+[global]
+setup-hooks =
+ pbr.hooks.setup_hook
+EOF
+
+cat <<EOF > setup.py
+import setuptools
+
+setuptools.setup(
+ setup_requires=['pbr'],
+ pbr=True)
+EOF
+
+mkdir test_project
+cat <<EOF > test_project/__init__.py
+def main():
+ print "Test cmd"
+EOF
+
+epvenv=$eptest/venv
+mkvenv $epvenv setuptools pip
+
+eppbrdir=$tmpdir/eppbrdir
+git clone $REPODIR/pbr $eppbrdir
+$epvenv/bin/pip install -e $eppbrdir
+
+PBR_VERSION=0.0 $epvenv/bin/python setup.py install
+cat $epvenv/bin/test_cmd
+grep 'PBR Generated' $epvenv/bin/test_cmd
+$epvenv/bin/test_cmd | grep 'Test cmd'
+
projectdir=$tmpdir/projects
mkdir -p $projectdir