diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-11-12 18:21:57 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-11-22 15:58:06 +0000 |
commit | 41562e063e33232111d17d3769ae4d58266a3b56 (patch) | |
tree | 8550fc5893e1d63f0dda82f24ac45db35f1d2239 /autobuild.sh | |
parent | e8785236790ec41e1999a8087feaa1109ab41e5c (diff) | |
download | libvirt-python-v9-41562e063e33232111d17d3769ae4d58266a3b56.tar.gz libvirt-python-v9-41562e063e33232111d17d3769ae4d58266a3b56.tar.xz libvirt-python-v9-41562e063e33232111d17d3769ae4d58266a3b56.zip |
Setup distutils build system
Create a setup.py for building libvirt python code and add
supporting files
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'autobuild.sh')
-rwxr-xr-x | autobuild.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/autobuild.sh b/autobuild.sh new file mode 100755 index 0000000..b3beaf1 --- /dev/null +++ b/autobuild.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -ve + +: ${AUTOBUILD_INSTALL_ROOT="$HOME/builder"} + +rm -rf MANIFEST dist build + + +python setup.py sdist + +python setup.py build +python setup.py test +python setup.py install --root="$AUTOBUILD_INSTALL_ROOT" + +type -p /usr/bin/rpmbuild > /dev/null 2>&1 || exit 0 + +if [ -n "$AUTOBUILD_COUNTER" ]; then + EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" +else + NOW=`date +"%s"` + EXTRA_RELEASE=".$USER$NOW" +fi +rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean dist/*.tar.gz |