[22099] trunk/dports/python

source_changes at macosforge.org source_changes at macosforge.org
Sat Feb 17 11:50:59 PST 2007


Revision: 22099
          http://trac.macosforge.org/projects/macports/changeset/22099
Author:   mww at macports.org
Date:     2007-02-17 11:50:59 -0800 (Sat, 17 Feb 2007)

Log Message:
-----------
new port py25-zlib - Python (v2.5) bindings to zlib

Added Paths:
-----------
    trunk/dports/python/py25-zlib/
    trunk/dports/python/py25-zlib/Portfile
    trunk/dports/python/py25-zlib/files/
    trunk/dports/python/py25-zlib/files/setup.py

Added: trunk/dports/python/py25-zlib/Portfile
===================================================================
--- trunk/dports/python/py25-zlib/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-zlib/Portfile	2007-02-17 19:50:59 UTC (rev 22099)
@@ -0,0 +1,43 @@
+# $Id: Portfile 21460 2007-01-25 20:57:54Z mww at macports.org $
+
+PortSystem 1.0
+#PortGroup python25 1.0
+
+name			py25-zlib
+version			2.5
+categories		python
+platforms		darwin
+maintainers		mww at macports.org
+description		Python bindings to zlib
+long_description	${description}
+
+homepage		http://www.python.org/doc/current/lib/module-zlib.html
+master_sites	http://www.python.org/ftp/python/${version}/
+distname		Python-${version}
+dist_subdir		python25
+checksums		sha1 98ce9346cc4a7ef4621ecdcfc3957d595d97a078
+use_bzip2		yes
+
+worksrcdir		${worksrcdir}/Modules
+
+extract.post_args	"| tar -xf - ${distname}/Modules/zlibmodule.c"
+post-extract {
+	file copy	${filespath}/setup.py ${worksrcpath}
+}
+
+#depends_lib-append	port:zlib
+depends_lib		port:python25 port:zlib
+
+configure	{
+	cd ${worksrcpath}
+	reinplace "s|__VERSION__|${version}|g" setup.py
+	reinplace "s|__LIBDIR__|${prefix}/lib|g" setup.py
+	reinplace "s|__INCDIR__|${prefix}/include|g" setup.py
+}
+
+# remove these lines when python25 port group is available
+build.cmd		${prefix}/bin/python2.5 setup.py
+build.target	build
+destroot.cmd	${build.cmd}
+destroot.destdir	--prefix=${prefix} --root=${destroot}
+

Added: trunk/dports/python/py25-zlib/files/setup.py
===================================================================
--- trunk/dports/python/py25-zlib/files/setup.py	                        (rev 0)
+++ trunk/dports/python/py25-zlib/files/setup.py	2007-02-17 19:50:59 UTC (rev 22099)
@@ -0,0 +1,21 @@
+try:
+    import distutils
+    from distutils import sysconfig
+    from distutils.command.install import install
+    from distutils.core import setup, Extension
+except:
+    raise SystemExit, "Distutils problem"
+
+inc_dirs = ["__INCDIR__"]
+lib_dirs = ["__LIBDIR__"]
+libs = ["z"]
+
+setup(name = "zlib",
+      version = "__VERSION__",
+      description = "zlib Extension to Python",
+      
+      ext_modules = [Extension('zlib', ['zlibmodule.c'],
+                               include_dirs = inc_dirs,
+                               libraries = libs,
+                               library_dirs = lib_dirs)]
+      )

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070217/f316964c/attachment.html


More information about the macports-changes mailing list