Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 872217 Details for
Bug 1074170
setup.py script executes pkg-config even on "clean" target
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Don't run pkgconfig when running setup.py clean
a.diff (text/plain), 4.56 KB, created by
Matthew Garrett
on 2014-03-08 17:04:35 UTC
(
hide
)
Description:
Don't run pkgconfig when running setup.py clean
Filename:
MIME Type:
Creator:
Matthew Garrett
Created:
2014-03-08 17:04:35 UTC
Size:
4.56 KB
patch
obsolete
>diff --git a/setup.py b/setup.py >index 953adc6..934e82e 100755 >--- a/setup.py >+++ b/setup.py >@@ -25,24 +25,6 @@ MIN_LIBVIRT_LXC = "1.0.2" > if not os.path.exists("build"): > os.mkdir("build") > >-pkgcfg = distutils.spawn.find_executable("pkg-config") >- >-if pkgcfg is None: >- raise Exception("pkg-config binary is required to compile libvirt-python") >- >-spawn([pkgcfg, >- "--print-errors", >- "--atleast-version=%s" % MIN_LIBVIRT, >- "libvirt"]) >- >-have_libvirt_lxc=False >-try: >- spawn([pkgcfg, >- "--atleast-version=%s" % MIN_LIBVIRT_LXC, >- "libvirt"]) >-except DistutilsExecError: >- have_libvirt_lxc=False >- > def get_pkgconfig_data(args, mod, required=True): > """Run pkg-config to and return content associated with it""" > f = os.popen("%s %s %s" % (pkgcfg, " ".join(args), mod)) >@@ -73,48 +55,68 @@ def get_api_xml_files(): > > return (libvirt_api, libvirt_qemu_api, libvirt_lxc_api) > >-ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False) >-cflags = get_pkgconfig_data(["--cflags"], "libvirt", False) >- > c_modules = [] > py_modules = [] > >-module = Extension('libvirtmod', >- sources = ['libvirt-override.c', 'build/libvirt.c', 'typewrappers.c', 'libvirt-utils.c'], >- libraries = [ "virt" ], >- include_dirs = [ "." ]) >-if cflags != "": >- module.extra_compile_args.append(cflags) >-if ldflags != "": >- module.extra_link_args.append(ldflags) >- >-c_modules.append(module) >-py_modules.append("libvirt") >- >-moduleqemu = Extension('libvirtmod_qemu', >- sources = ['libvirt-qemu-override.c', 'build/libvirt-qemu.c', 'typewrappers.c', 'libvirt-utils.c'], >- libraries = [ "virt-qemu" ], >+if 'clean' not in sys.argv: >+ pkgcfg = distutils.spawn.find_executable("pkg-config") >+ >+ if pkgcfg is None: >+ raise Exception("pkg-config binary is required to compile libvirt-python") >+ >+ spawn([pkgcfg, >+ "--print-errors", >+ "--atleast-version=%s" % MIN_LIBVIRT, >+ "libvirt"]) >+ >+ have_libvirt_lxc=False >+ try: >+ spawn([pkgcfg, >+ "--atleast-version=%s" % MIN_LIBVIRT_LXC, >+ "libvirt"]) >+ except DistutilsExecError: >+ have_libvirt_lxc=False >+ >+ >+ ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False) >+ cflags = get_pkgconfig_data(["--cflags"], "libvirt", False) >+ >+ module = Extension('libvirtmod', >+ sources = ['libvirt-override.c', 'build/libvirt.c', 'typewrappers.c', 'libvirt-utils.c'], >+ libraries = [ "virt" ], > include_dirs = [ "." ]) >-if cflags != "": >- moduleqemu.extra_compile_args.append(cflags) >-if ldflags != "": >- moduleqemu.extra_link_args.append(ldflags) >- >-c_modules.append(moduleqemu) >-py_modules.append("libvirt_qemu") >- >-if have_libvirt_lxc: >- modulelxc = Extension('libvirtmod_lxc', >- sources = ['libvirt-lxc-override.c', 'build/libvirt-lxc.c', 'typewrappers.c', 'libvirt-utils.c'], >- libraries = [ "virt-lxc" ], >- include_dirs = [ "." ]) > if cflags != "": >- modulelxc.extra_compile_args.append(cflags) >+ module.extra_compile_args.append(cflags) > if ldflags != "": >- modulelxc.extra_link_args.append(ldflags) >+ module.extra_link_args.append(ldflags) >+ >+ c_modules.append(module) >+ py_modules.append("libvirt") > >- c_modules.append(modulelxc) >- py_modules.append("libvirt_lxc") >+ moduleqemu = Extension('libvirtmod_qemu', >+ sources = ['libvirt-qemu-override.c', 'build/libvirt-qemu.c', 'typewrappers.c', 'libvirt-utils.c'], >+ libraries = [ "virt-qemu" ], >+ include_dirs = [ "." ]) >+ if cflags != "": >+ moduleqemu.extra_compile_args.append(cflags) >+ if ldflags != "": >+ moduleqemu.extra_link_args.append(ldflags) >+ >+ c_modules.append(moduleqemu) >+ py_modules.append("libvirt_qemu") >+ >+ if have_libvirt_lxc: >+ modulelxc = Extension('libvirtmod_lxc', >+ sources = ['libvirt-lxc-override.c', 'build/libvirt-lxc.c', 'typewrappers.c', 'libvirt-utils.c'], >+ libraries = [ "virt-lxc" ], >+ include_dirs = [ "." ]) >+ if cflags != "": >+ modulelxc.extra_compile_args.append(cflags) >+ if ldflags != "": >+ modulelxc.extra_link_args.append(ldflags) >+ >+ c_modules.append(modulelxc) >+ py_modules.append("libvirt_lxc") > > > class my_build(build):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1074170
: 872217 |
1158143