aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* tools: make building xend configurable.Ian Campbell2013-08-201-2/+8
| | | | | | | | | | | | | xend has been deprecated for 2 releases now. Lets make it possible to not even build it. For now I'm leaving the default of on but I would like to change that before the 4.4 release. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: move xm and xend under tools pythonIan Campbell2013-08-201-0/+4
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/python: Clean python correctlyAndrew Cooper2012-08-171-1/+1
| | | | | | | | | | Cleaning the python directory should completely remove the build/ directory, otherwise subsequent builds may be short-circuited and a stale build installed. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Rename libxl IDL infrastructure.Ian Campbell2012-01-311-1/+1
| | | | | | | | | | | | | | | | Originally libxltypes.py provided the infrastructure and libxl.idl provided the specific types. In 23887:a543e10211f7 libxl.idl became libxl_types.idl (to allow for libxl_types_internal.idl) which means we now have libxl_types.FOO and libxltypes.FOO providing different things and annoying people in tab completion. Rename the infrastructure as idl. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: Rename libxl.idl to libxl_types.idl.Anthony PERARD2011-09-291-2/+2
| | | | | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> --HG-- rename : tools/libxl/libxl.idl => tools/libxl/libxl_types.idl
* xend: drop XenAPI error message translationIan Campbell2011-04-081-59/+4
| | | | | | | | | | | | | | | | | | The only "translation" is to the C locale (e.g. the NUL translation). I think it very unlikely we are going to see any new translations of the XenAPI error messages at this point so the only purpose of this code appears to be to periodically regenerate xen-xm.pot with a new embedded timestamp, to the detriment of those of us who use a version control system. After much beating with sticks I mananged to enable XenAPI support in xend and configure xm such that it returns "Permission denied." (AKA the SESSION_AUTHENTICATION_FAILED message) which I take to be a sign I've not broken things too badly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-171-1/+1
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* libxl, tools/python: Add libxl python bindingGianni Tedesco2010-09-161-1/+8
| | | | | | | | | | | | | | | | Introduce python binding for libxl. The binding is not yet complete but serveral methods are implemented and tested. Those which are implemented provide examples of the two or three basic patterns that most future methods should follow. Over 5,000 lines of boilerplate is automatically generated to wrap and export all relevant libxl structure definitions. There are a few places where such code cannot be fully auto-generated and special hooks are declared and stubbed where, for example, conversion between libxl_file_reference and a python file object is required. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* python: Don't install anything directly under /usr/shareKeir Fraser2010-02-221-2/+2
| | | | Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
* Get rid of hardcoded pathes for stubdom and hotplug scriptsKeir Fraser2009-06-231-13/+4
| | | | | | | | | | | | | | | | | | - Have the buid system generate a file which exports the install paths for the hotplug scripts and stubdom / stubdom-dm - Move file generation code from tools/python/Makefile into a gmake macro in Config.mk to avoid maintenance of three duplicates each with its own tweaks and bugs - Export gmake variables into ioemu as shell variables for upcoming ioemu patches - Do above as a gmake macro to avoid maintenance of several duplicates - Adjust hotplug scripts to find the right xen binaries from the install directory - Adjust stubdom-dm to use the install directories Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: don't require hardcoded firmware path in guest config fileKeir Fraser2009-06-231-10/+12
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: consistently use $(PYTHON)Keir Fraser2009-06-231-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph. Egger@amd.com>
* xm: xen-api: Install create.dtd in SHAREDIRKeir Fraser2009-06-041-2/+3
| | | | | | | | | | | | | | | * Install create.dtd in SHAREDIR * Use SHAREDIR/create.dtd * import os.path.join into xenapi_create.py, it already seems to be used many times Resolves the following error when using XenAPI: $ xm create hvm.conf Couldn't open resource '/usr/share/xen/create.dtd' at /usr/share/xen/create.dtd:1:0 Signed-off-by: Simon Horman <horms@verge.net.au>
* tools: get rid of hardcoded config dirsKeir Fraser2009-05-201-0/+2
| | | | | | | | | Remove *all* hardcoded "/etc/xen" strings in python code. Additionally, it removes pygrub_path from osdep.py. Its use has been replaced with auxbin.pathTo("pygrub"). Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: Fix an obvious xgettext build typo.Keir Fraser2009-05-191-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* python: get rid of hardcoded search pathes in python code.Keir Fraser2009-05-191-2/+11
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Permit user to suppress passing --prefix to setup.pyKeir Fraser2009-05-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | We change all invocations of setup.py as follows: * use $(PYTHON) instead of `python' so that the user can specify an alternative python version if they need to. If not set it defaults to `python' in Config.mk. * pass --prefix=$(PREFIX) via a new make variable $(PYTHON_PREFIX_ARG). This allows a user to suppress the --prefix=... argument entirely by setting PYTHON_PREFIX_ARG=''. This will work around the bug described here https://bugs.launchpad.net/ubuntu/+bug/362570 where passing --prefix=/usr/local (which ought to have no effect as /usr/local is the default prefix) changes which subdirectory distutils chooses, and results in the files being installed in site-packages which is not on the default search path. Users not affected by this python packaging bug should not set PYTHON_PREFIX_ARG and their builds will not be affected. (Provided PREFIX did not contain spaces. People who put spaces in PREFIX are being quite optimistic.) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Always use sane upstream (`native') python pathsKeir Fraser2009-04-081-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, by default we would install our python modules into /usr/lib/python/xen, for example /usr/lib/python/xen/__init__.py. Upstream python's standard install location (a) includes the Python version number and (b) puts things in site-packages by default. Our best conjecture for the reason for this was an attempt to make the installs portable between different python versions. However, that doesn't work because compiled python modules (.pyc), and C python extensions corresponding to one version of python, are not compatible across different versions of python. This is why upstream include the version number. site-packages is the standard location for locally-installed packages and is automatically included on the python search path. In this change, we abandon our own unusual python path setup: * Invoke setup.py in an entirely standard manner. We pass PREFIX and DESTDIR using the appropriate options provided by setup.py for those purposes (adding them to setup.py calls which were previously lacking them). * Since the installation locations are now on the standard python path, we no longer need to add anything to the path in any of our python utilities. Therefore remove all that code from every python script. (Many of these scripts unconditionally added /usr/lib/python and /usr/lib64/python which is wrong even in the old world.) * There is no longer any special `Xen python path'. xen-python-path is no longer needed. It is no longer called by anything in our tree. However since out-of-tree callers may still invoke it, we retain it. It now prints a fixed string referring to a directory which does not to exist; callers (who use it to augment their python path) will thus add a nonexistent directory to their python path which is harmless. * Remove various workarounds including use of setup.py --home (which is intended for something completely different). * Remove tests for the XEN_PYTHON_NATIVE_INSTALL build-time environment variable. The new behaviour is the behaviour which we should have had if this variable had been set. That is, it is now as if this variable was always set but also bugs in the resulting install have been fixed. This should be a proper fix for the bug addressed by c/s 19515. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: fix python installationKeir Fraser2009-04-071-2/+1
| | | | | | | | | | | attached patch lets python install the modules into DESTDIR/PREFIX as before, but lets python search the modules in PREFIX rather DESTDIR/PREFIX. This prevents failures about not finding python modules after files have been installed into PREFIX. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* build: Get rid of some more hardcoded install pathsKeir Fraser2009-03-311-5/+5
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xsm, python tools: remove autogenerated xsm.pyKeir Fraser2008-09-041-23/+3
| | | | | | | | | | | | | | | | | | | | | | - The patch does away with the autogenerated xsm.py file and introduces a config parameter in xend-config.sxp to determine the security module. The parameter is (xsm_module_name {acm, dummy, flask}). The default setting/option is dummy. .hgignore is also updated to stop ignoring xsm.py on commits. - The patch has created an xsconstant for XS_POLICY_FLASK and updated the toolchain to check the instance of XS_POLICY_USE. XS_POLICY_USE evalauates to XS_POLICY_FLASK or XS_POLICY_ACM or XS_POLICY_DUMMY depending on configuration. - Flask relies on the current value of ssidref returned by dominfo to ensure that the label to sid mapping is consistent. ssidref had been pop'ed from the dominfo object. The patch addresses this issue. - Flask python module style cleanups. Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
* Fix some build system error handling.Keir Fraser2007-12-201-3/+3
| | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Some fixes for 'make clean'.Keir Fraser2007-12-141-1/+1
| | | | Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
* Fix handling of auto-generated file xsm.py.kfraser@localhost.localdomain2007-08-311-2/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Xen Security Modules: Tools.kfraser@localhost.localdomain2007-08-311-3/+23
| | | | Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
* tools: Use INSTALL_{DIR,DATA} to install stuff.kfraser@localhost.localdomain2007-04-171-5/+5
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix tools buildJames Bulpin2007-04-171-0/+1
| | | | Signed-off-by: James Bulpin <james@xensource.com>
* Install dtd into correct placeTom Wilkie2007-04-131-2/+5
| | | | signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
* Fix up locale strings for xmTom Wilkie2007-04-131-13/+55
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* [tools] Use auxbin.py to determine libpath at build time.Christian Limpach2007-03-051-1/+2
| | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Fix failure to localise xm by preventing cd from writing to stdoutkfraser@localhost.localdomain2007-01-221-1/+1
| | | | | which gets incorrectly captured as a value for the bash for loop. Signed-off-by: Keir Fraser <keir@xensource.com>
* Explicitly use GNU msgfmt on non-GNU systems.kaf24@localhost.localdomain2006-12-291-3/+3
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* Don't try to copy the .mo files if they haven't been built.Ewan Mellor2006-12-231-2/+4
| | | | Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Only build the message database if msgfmt is installed.Ewan Mellor2006-12-231-2/+4
| | | | Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Added I18N support for Xen-API error codes.Ewan Mellor2006-12-231-2/+12
| | | | Signed-off-by: Ewan Mellor <ewan@xensource.com>
* [SOLARIS] More tools fixes.kfraser@localhost.localdomain2006-10-181-3/+3
| | | | | | | | | Many of the tools use C99 features such as bool, or expect certain functions. Fix the CFLAGS to enable these on Solaris. Also make sure the correct $CC is passed to Python. Signed-off-by: John Levon <john.levon@sun.com>
* Fix python installation on sles10. Install prefix is beingkaf24@firebug.cl.cam.ac.uk2006-04-211-1/+1
| | | | | | | | passed along for some reason, so we explicitly redefine it to nothing. Signed-off-by: Ryan Grimm <grimm@us.ibm.com>
* build: Clean up use of .PHONYkaf24@firebug.cl.cam.ac.uk2006-04-101-2/+6
| | | | | | | | | | | | * Move .PHONY directives next to targets, this makes them a lot harder to miss * Add missing .PHONY directives * Remove nonexistent .PHONY directives * Hopefully I didn'T miss anything... Signed-Off-By: Horms <horms@verge.net.au>
* Ensure old Python files are overwritten during tools install.kaf24@firebug.cl.cam.ac.uk2006-03-081-2/+2
| | | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* Added Zope's test.py, and a unit test to sxp. This test itself isn't veryemellor@ewan2005-10-061-0/+3
| | | | | | | | exciting, but it's there to encourage the creation of more interesting ones. A test target has been added to the main Makefile, and the one in tools/python. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Added .PHONY target so that make works from the tools/python directory (it ↵ewan@linford.intra2005-09-131-1/+2
| | | | was seeing the build directory and therefore doing nothing).
* bitkeeper revision 1.1159.270.4 (42330defA42oRGAfkwmQERgN45uyOg)kaf24@viper.(none)2005-03-121-0/+5
| | | | | | | | Python packages can be installed to the Python installation's 'native' location, instead of generic /usr/lib/python, by specifying XEN_PYTHON_NATIVE_INSTALL in the environment or on the make command line. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1159.270.3 (42330ae8efsd9SdlhNX6EpksrtV6oQ)doogie@brainfood.com[kaf24]2005-03-121-1/+2
| | | | | | | | | [PATCH] add-build.patch Add build targets to all makefiles. Debian does builds as non-root, so it's better to do as much as possible before requiring root privs. Signed-off-by: Adam Heath <doogie@brainfood.com>
* bitkeeper revision 1.1159.223.44 (41f8c832pMZZ7WmykH_gAUBQHtPF1A)kaf24@scramble.cl.cam.ac.uk2005-01-271-2/+5
| | | | | | Allow target architecture to be specified by specifying ARCH variable to root Makefile (e.g, make ARCH=x86_32).
* bitkeeper revision 1.1159.223.40 (41f676cbajLGqFeWFqajtJ3X4OkgoA)kaf24@scramble.cl.cam.ac.uk2005-01-251-5/+1
| | | | | | Build system fixes. Signed-off-by: keir.fraser@cl.cam.ac.uk
* bitkeeper revision 1.1159.223.26 (41f2cdb6LNpheOtPoAKEUn-czlZFig)iap10@labyrinth.cl.cam.ac.uk2005-01-221-1/+5
| | | | | | | | | | | | | Description: use DESTDIR correctly Standard makefiles always attempt to install to the root(/). Setting DESTDIR is the normal way to install to an alternative location. Setting prefix has the possibility of breaking programs, as the prefix may have been embedded inside a compiled binary. From: Adam Heath <doogie@brainfood.com> Signed-off-by: ian.pratt@cl.cam.ac.uk
* bitkeeper revision 1.1159.170.89 (41e4ef8aHmcX3lP2zVDZBpN59cSX6A)kaf24@scramble.cl.cam.ac.uk2005-01-121-7/+1
| | | | | Python packages always install to ${prefix}/us/lib/python/xen/...
* bitkeeper revision 1.1026.1.8 (40e1b09foCFBM0EuIgrSA1uLJrWuzA)mjw@wray-m-3.hpl.hp.com2004-06-291-0/+15
Restructuring the python code and libs - first stage.