[22092] trunk/dports/python

source_changes at macosforge.org source_changes at macosforge.org
Sat Feb 17 08:18:26 PST 2007


Revision: 22092
          http://trac.macosforge.org/projects/macports/changeset/22092
Author:   mww at macports.org
Date:     2007-02-17 08:18:26 -0800 (Sat, 17 Feb 2007)

Log Message:
-----------
new port py25-bz2 - python 2.5 bindings to bzip2

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

Added: trunk/dports/python/py25-bz2/Portfile
===================================================================
--- trunk/dports/python/py25-bz2/Portfile	                        (rev 0)
+++ trunk/dports/python/py25-bz2/Portfile	2007-02-17 16:18:26 UTC (rev 22092)
@@ -0,0 +1,45 @@
+# $Id: Portfile 21460 2007-01-25 20:57:54Z mww at macports.org $
+
+PortSystem 1.0
+#PortGroup python25 1.0
+
+name			py25-bz2
+version			2.5
+categories		python
+platforms		darwin
+maintainers		mww at macports.org
+description		Python bindings to bzip2
+long_description	${description}
+
+homepage		http://www.python.org/doc/current/lib/module-bz2.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/bz2module.c"
+post-extract {
+	file copy	${filespath}/setup.py ${worksrcpath}
+}
+
+set libdir ${prefix}/lib/
+set incdir ${prefix}/include/
+#depends_lib-append	port:bzip2
+depends_lib		port:python25 port:bzip2
+
+configure	{
+	cd ${worksrcpath}
+	reinplace "s|__VERSION__|${version}|g" setup.py
+	reinplace "s|__LIBDIR__|${libdir}|g" setup.py
+	reinplace "s|__INCDIR__|${incdir}|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-bz2/files/setup.py
===================================================================
--- trunk/dports/python/py25-bz2/files/setup.py	                        (rev 0)
+++ trunk/dports/python/py25-bz2/files/setup.py	2007-02-17 16:18:26 UTC (rev 22092)
@@ -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 = ["bz2"]
+
+setup(name = "bz2",
+      version = "__VERSION__",
+      description = "bz2 Extension to Python",
+      
+      ext_modules = [Extension('bz2', ['bz2module.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/b6c54cc2/attachment.html


More information about the macports-changes mailing list