[jenkins-ci PATCH 1/5] jobs: Call rpmbuild explicitly for Python projects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of using the custom 'rpm' target of setup.py,
generate a dist archive using the 'sdist' target and then
call rpmbuild ourselves: this way we can define _topdir
and stop artifacts from ending up in ~/rpmbuild.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 jobs/python-distutils.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml
index 0b20b17..5601d26 100644
--- a/jobs/python-distutils.yaml
+++ b/jobs/python-distutils.yaml
@@ -122,7 +122,9 @@
           {global_env}
           {local_env}
           sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in
-          $PYTHON ./setup.py rpm
+          rm -f dist/*.tar.{{ archive_format }}
+          $PYTHON ./setup.py sdist
+          rpmbuild --clean --define "_topdir `pwd`/rpmbuild" -ta dist/*.tar.{{ archive_format }}
     publishers:
       - email:
           recipients: '{obj:spam}'
-- 
2.17.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux