[libvirt] [jenkins-ci PATCH 1/5] jobs: Call rpmbuild explicitly for Python projects
Erik Skultety
eskultet at redhat.com
Mon Aug 20 14:01:22 UTC 2018
On Fri, Aug 10, 2018 at 03:37:41PM +0200, Andrea Bolognani wrote:
> 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 at redhat.com>
> ---
> 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 }}
So what if you used a standard bdist_rpm command from distutils core, I believe
$PYTHON ./setup.py bdist_rpm --bdist-base <foo> would be equal to your _topdir.
Although, that's just what I've digested from distutils docs, so even though
bdist_rpm has a plethora of options you can specify there can always be one
we'll be missing :P
Erik
> publishers:
> - email:
> recipients: '{obj:spam}'
> --
> 2.17.1
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
More information about the libvir-list
mailing list