From: Josh Karlin Date: Thu, 22 Apr 2010 17:30:18 +0000 (+0000) Subject: Added 'make uninstall' which uninstalls all files installed by python installer.... X-Git-Tag: geni-apiv1-totrunk~41 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=8ead46e083f8951f51cc4dec115fb0b1b486ef34 Added 'make uninstall' which uninstalls all files installed by python installer. This makes it easier for OS X which installs files in weird places --- diff --git a/Makefile b/Makefile index 65d63e7f..3bdf714d 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,10 @@ # overwritten by the specfile DESTDIR="/" +ifndef PREFIX + PREFIX="/usr" +endif + ########## all: keyconvert python wsdl @@ -11,6 +15,8 @@ install: keyconvert-install python-install wsdl-install xmlbuilder-install clean: keyconvert-clean python-clean wsdl-clean +uninstall: python-uninstall + .PHONY: all install clean ########## @@ -30,11 +36,16 @@ python: xmlbuilder-install: cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd - - + python-install: - python setup.py install --root=$(DESTDIR) + python setup.py install --root=$(DESTDIR) --home=$(PREFIX) | grep copying >> python_install.log chmod 444 $(DESTDIR)/etc/sfa/default_config.xml +python-uninstall: + python setup.py uninstall + bash uninstall_python.sh + $(awk '{print $$4}' python_install.log) + python-clean: python setup.py clean rm $(init) diff --git a/uninstall_python.sh b/uninstall_python.sh new file mode 100644 index 00000000..de857b67 --- /dev/null +++ b/uninstall_python.sh @@ -0,0 +1,7 @@ +#!/bin/bash +for l in $(awk '{split($2, spl, "/"); print $4"\/"spl[length(spl)]}' python_install.log) +do + rm $l 2> /dev/null +done + +exit 0 \ No newline at end of file diff --git a/xmlbuilder-0.9/xmlbuilder.egg-info/PKG-INFO b/xmlbuilder-0.9/xmlbuilder.egg-info/PKG-INFO index bb65a9de..d62ca7c6 100644 --- a/xmlbuilder-0.9/xmlbuilder.egg-info/PKG-INFO +++ b/xmlbuilder-0.9/xmlbuilder.egg-info/PKG-INFO @@ -7,74 +7,74 @@ Author: koder Author-email: koder_dot_mail@gmail_dot_com License: MIT Download-URL: http://pypi.python.org/pypi/xmlbuilder -Description: Example of usage: - ----------------- - - - from __future__ import with_statement - from xmlbuilder import XMLBuilder - x = XMLBuilder(format=True) - with x.root(a = 1): - with x.data: - [x << ('node',{'val':i}) for i in range(10)] - - print str(x) - - will print - - <root a="1"> - <data> - <node val="0" /> - <node val="1" /> - <node val="2" /> - <node val="3" /> - <node val="4" /> - <node val="5" /> - <node val="6" /> - <node val="7" /> - <node val="8" /> - <node val="9" /> - </data> - </root> - - Mercurial repo:http://hg.assembla.com/MyPackages/ - - Documentations - -------------- - `XMLBuilder` is simple library build on top of `ElementTree.TreeBuilder` to - simplify xml files creation as much as possible. Althow it can produce - structured result with identated child tags. `XMLBuilder` use python `with` - statement to define xml tag levels and `<<` operator for simple cases - - text and tag without childs. - - First we need to create xmlbuilder - - from xmlbuilder import XMLBuilder - # params - encoding = 'utf8', - # builder = None, - ElementTree.TreeBuilder - # tab_level = None, - current tab l;evel - for formatted output only - # format = False, - create formatted output - # tab_step = " " * 4 - indentation step - xml = XMLBuilder() - - - Use `with` statement to make document structure - #create and open tag 'root_tag' with text 'text' and attributes - with xml.root_tag(text,attr1=val1,attr2=val2): - #create and open tag 'sub_tag' - with xml.sub_tag(text,attr3=val3): - #create tag which are not valid python identificator - with xml('one-more-sub-tag',attr7=val37): - xml << "Some textual data" - #here tag 'one-more-sub-tag' are closed - #Tags without children can be created using `<<` operator - for val in range(15): - xml << ('message',"python rocks!"[:i]) - #create 15 child tag like <message> python r</message> - #all tags closed - node = ~x # get etree.ElementTree object - xml_data = str(x) - unicode_xml_data = unicode(x) +Description: Example of usage: + ----------------- + + + from __future__ import with_statement + from xmlbuilder import XMLBuilder + x = XMLBuilder(format=True) + with x.root(a = 1): + with x.data: + [x << ('node',{'val':i}) for i in range(10)] + + print str(x) + + will print + + <root a="1"> + <data> + <node val="0" /> + <node val="1" /> + <node val="2" /> + <node val="3" /> + <node val="4" /> + <node val="5" /> + <node val="6" /> + <node val="7" /> + <node val="8" /> + <node val="9" /> + </data> + </root> + + Mercurial repo:http://hg.assembla.com/MyPackages/ + + Documentations + -------------- + `XMLBuilder` is simple library build on top of `ElementTree.TreeBuilder` to + simplify xml files creation as much as possible. Althow it can produce + structured result with identated child tags. `XMLBuilder` use python `with` + statement to define xml tag levels and `<<` operator for simple cases - + text and tag without childs. + + First we need to create xmlbuilder + + from xmlbuilder import XMLBuilder + # params - encoding = 'utf8', + # builder = None, - ElementTree.TreeBuilder + # tab_level = None, - current tab l;evel - for formatted output only + # format = False, - create formatted output + # tab_step = " " * 4 - indentation step + xml = XMLBuilder() + + + Use `with` statement to make document structure + #create and open tag 'root_tag' with text 'text' and attributes + with xml.root_tag(text,attr1=val1,attr2=val2): + #create and open tag 'sub_tag' + with xml.sub_tag(text,attr3=val3): + #create tag which are not valid python identificator + with xml('one-more-sub-tag',attr7=val37): + xml << "Some textual data" + #here tag 'one-more-sub-tag' are closed + #Tags without children can be created using `<<` operator + for val in range(15): + xml << ('message',"python rocks!"[:i]) + #create 15 child tag like <message> python r</message> + #all tags closed + node = ~x # get etree.ElementTree object + xml_data = str(x) + unicode_xml_data = unicode(x) Keywords: xml Platform: UNKNOWN diff --git a/xmlbuilder-0.9/xmlbuilder.egg-info/SOURCES.txt b/xmlbuilder-0.9/xmlbuilder.egg-info/SOURCES.txt index 107062ca..4cc27de9 100644 --- a/xmlbuilder-0.9/xmlbuilder.egg-info/SOURCES.txt +++ b/xmlbuilder-0.9/xmlbuilder.egg-info/SOURCES.txt @@ -10,4 +10,4 @@ xmlbuilder.egg-info/SOURCES.txt xmlbuilder.egg-info/dependency_links.txt xmlbuilder.egg-info/top_level.txt xmlbuilder/docs/long_descr.rst -xmlbuilder/tests/__init__.py +xmlbuilder/tests/__init__.py \ No newline at end of file