On Oct 11, 2007, at 08:36, source_changes@macosforge.org wrote:
Revision: 29835 http://trac.macosforge.org/projects/macports/changeset/29835 Author: nox@macports.org Date: 2007-10-11 06:36:52 -0700 (Thu, 11 Oct 2007)
Log Message: ----------- py25-libxml2: * Changed docdir name into a versioned one. * Changed homepage to something more relevant. * libxslt is now directly disabled in setup.py, no more hazardous file delete calls.
You've replaced what looks like some simple code in the portfile to delete unwanted files.... with a whole bunch of Python code that will have to be maintained going forward. Is that really better? What was so hazardous about the "file delete" calls? Or is this Python code something that has been submitted upstream? That would be better since then we wouldn't have to maintain it.
Modified Paths: -------------- trunk/dports/python/py25-libxml2/Portfile trunk/dports/python/py25-libxml2/files/patch-setup.py.diff
Modified: trunk/dports/python/py25-libxml2/Portfile =================================================================== --- trunk/dports/python/py25-libxml2/Portfile 2007-10-11 12:11:00 UTC (rev 29834) +++ trunk/dports/python/py25-libxml2/Portfile 2007-10-11 13:36:52 UTC (rev 29835) @@ -6,16 +6,21 @@
name py25-libxml2 version 2.6.21 +revision 1 categories python textproc platforms darwin maintainers sfiera openmaintainer description Python bindings for libxml2 long_description ${description}
-homepage http://xmlsoft.org/ +homepage http://xmlsoft.org/python.html master_sites ftp://xmlsoft.org/libxml2/python/ distname libxml2-python-${version} -checksums md5 229dd2b3d110a77defeeaa73af83f7f3 + +checksums md5 229dd2b3d110a77defeeaa73af83f7f3 \ + sha1 2d395e8a5e9accd68f4e78ac2391431ef884e9d5 \ + rmd160 d4973576c33e0e65c4fc41b31ee3df5f803abfad + patchfiles patch-setup.py.diff
depends_lib-append port:libxml2 \ @@ -28,19 +33,13 @@ }
post-destroot { - # strip out anything related to libxslt, so py-libxml2 doesn't conflict with - # py-libxslt - fs-traverse file ${destroot} { - if {[file isfile ${file}]} { - if {[string match "*xslt*" ${file}]} { - file delete ${file} - } - } - } - xinstall -m 644 -W ${worksrcpath} README TODO \ - ${destroot}${prefix}/share/doc/${name} + set docdir ${prefix}/share/doc/${name}-${version} + xinstall -d ${destroot}${docdir} + xinstall -m 0644 -W ${worksrcpath} README TODO \ + ${destroot}${docdir} }
livecheck.check md5 livecheck.url ftp://xmlsoft.org/libxml2/python/ livecheck.md5 a2cc31311f1b3fb52a08cf1056efda11 +
Modified: trunk/dports/python/py25-libxml2/files/patch-setup.py.diff =================================================================== --- trunk/dports/python/py25-libxml2/files/patch-setup.py.diff 2007-10-11 12:11:00 UTC (rev 29834) +++ trunk/dports/python/py25-libxml2/files/patch-setup.py.diff 2007-10-11 13:36:52 UTC (rev 29835) @@ -1,5 +1,5 @@ ---- setup.py 2005-09-04 19:12:47.000000000 -0400 -+++ setup.py.new 2007-05-16 07:46:02.000000000 -0400 +--- setup.py.orig 2007-10-11 15:24:20.000000000 +0200 ++++ setup.py 2007-10-11 15:24:54.000000000 +0200 @@ -56,11 +56,7 @@ # - iconv.h # - libxslt/xsltconfig.h @@ -22,3 +22,36 @@ ]
xml_files = ["libxml2-api.xml", "libxml2-python-api.xml", +@@ -122,32 +118,6 @@ + result.close() + + with_xslt=0 +-if missing("libxslt-py.c") or missing("libxslt.py"): +- if missing("xsltgenerator.py") or missing("libxslt-api.xml"): +- print "libxslt stub generator not found, libxslt not built" +- else: +- try: +- import xsltgenerator +- except: +- print "failed to generate stubs for libxslt, aborting ..." +- print sys.exc_type, sys.exc_value +- else: +- head = open("libxsl.py", "r") +- generated = open("libxsltclass.py", "r") +- result = open("libxslt.py", "w") +- for line in head.readlines(): +- if WITHDLLS: +- result.write(altImport(line)) +- else: +- result.write(line) +- for line in generated.readlines(): +- result.write(line) +- head.close() +- generated.close() +- result.close() +- with_xslt=1 +-else: +- with_xslt=1 + + if with_xslt == 1: + xslt_includes=""
_______________________________________________ macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
On 11 Oct, 2007, at 16:00, Ryan Schmidt wrote:
On Oct 11, 2007, at 08:36, source_changes@macosforge.org wrote:
Revision: 29835 http://trac.macosforge.org/projects/macports/changeset/ 29835 Author: nox@macports.org Date: 2007-10-11 06:36:52 -0700 (Thu, 11 Oct 2007)
Log Message: ----------- py25-libxml2: * Changed docdir name into a versioned one. * Changed homepage to something more relevant. * libxslt is now directly disabled in setup.py, no more hazardous file delete calls.
You've replaced what looks like some simple code in the portfile to delete unwanted files.... with a whole bunch of Python code that will have to be maintained going forward. Is that really better? What was so hazardous about the "file delete" calls? Or is this Python code something that has been submitted upstream? That would be better since then we wouldn't have to maintain it.
(note: I maintain py-libxml2/py-libxslt/py25-libxml2 and I'm using the former names because they're easier to type and the ports are the same) Actually, what the patch does is to delete code from setup.py; it would otherwise build py-libxslt. There is not actually a separate package for py-libxml2 and py- libxslt upstream, and the way that these ports worked (prior to this patch) was to have both ports potentially build both packages, then strip out *xslt* from py-libxml2 and !*xslt* from py-libxslt. This change causes py-libxml2 to not build py-libxslt in any circumstance. It's potentially cleaner (and if setup.py changes, the patch will need to anyway). But, unless N_Ox has a way of making a symmetric change in py-libxslt, I'm going to revert the change. I am more concerned with guaranteeing that py-libxml2 and py-libxslt do not conflict than the extra CPU cycles to build them twice. Chris
On Oct 11, 2007, at 15:21, Chris Pickel wrote:
You've replaced what looks like some simple code in the portfile to delete unwanted files.... with a whole bunch of Python code that will have to be maintained going forward. Is that really better? What was so hazardous about the "file delete" calls? Or is this Python code something that has been submitted upstream? That would be better since then we wouldn't have to maintain it.
Actually, what the patch does is to delete code from setup.py; it would otherwise build py-libxslt.
Hey, how about that. I saw the "+" at the beginning of the line and totally missed the "-" right after it. Whoops.
Le 11 oct. 07 à 22:00, Ryan Schmidt a écrit :
On Oct 11, 2007, at 08:36, source_changes@macosforge.org wrote:
Revision: 29835 http://trac.macosforge.org/projects/macports/changeset/ 29835 Author: nox@macports.org Date: 2007-10-11 06:36:52 -0700 (Thu, 11 Oct 2007)
Log Message: ----------- py25-libxml2: * Changed docdir name into a versioned one. * Changed homepage to something more relevant. * libxslt is now directly disabled in setup.py, no more hazardous file delete calls.
You've replaced what looks like some simple code in the portfile to delete unwanted files.... with a whole bunch of Python code that will have to be maintained going forward. Is that really better? What was so hazardous about the "file delete" calls? Or is this Python code something that has been submitted upstream? That would be better since then we wouldn't have to maintain it.
The patch is awfully simple to maintain, just remove the part that enable xslt support. I've changed the disable method because with "file delete", you end up with /opt/local/lib/python2.5/site-packages/libxml2mod.so linking to libxslt, which should not. You can always say i'm obviously dumb of not having stated it in the commit log ;) Regards, PS: Could you tell me how to use the revprop thing? -- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
On Oct 11, 2007, at 15:31, N_Ox wrote:
PS: Could you tell me how to use the revprop thing?
You mean to change a commit message? Sure: svn propedit --revprop -r29835 svn:log http://svn.macosforge.org/ repository/macports The order of the arguments after "propedit" doesn't matter so much as long as they're all there.
participants (3)
-
Chris Pickel
-
N_Ox
-
Ryan Schmidt