[29835] trunk/dports/python/py25-libxml2

Ryan Schmidt ryandesign at macports.org
Thu Oct 11 13:00:06 PDT 2007


On Oct 11, 2007, at 08:36, source_changes at macosforge.org wrote:

> Revision: 29835
>           http://trac.macosforge.org/projects/macports/changeset/29835
> Author:   nox at 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 at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macports-changes



More information about the macports-dev mailing list