I started working on Python 3.1. So far, it looks like it will be
relatively easy. Most of the infrastructure for building Python wont
have to change to accomodate the new version.

One of the problem I ran into was that Python 3 executable are suffixed
with '3':
  python3, python3-config, pydoc3, & idle3

  I had to add a variable PYBIN_SUFFIX and a little bit of code in
  /usr/ports/lang/python/Makefile.inc to make things work. (The patch is
  attached)

Things left todo:
- Submit patches to bugs.python.org, it looks like most patches in the
  port tree stay in the port tree (for Python at least). It would be
  nice to forward those patches upstream. I have modified some patches
  to make them more 'acceptable' upstream.
- Some unit tests are broken
- python-bsddb doesn't build


I have created a repository on bitbucket:

  http://bitbucket.org/henry/python-31-openbsd-port/

The tarball of the last version is here:
  
  http://bitbucket.org/henry/python-31-openbsd-port/get/tip.gz

To test the port:

  $ tar zxvf python-31-openbsd-port-tip.gz
  $ mv python-31-openbsd-port /usr/ports/lang/python/3.1

  Apply the attached patch to /usr/ports/lang/python/Makefile.inc

  $ cd /usr/ports/lang/python && patch -p 0 < Makefile.inc.diff 


Feedbacks are greatly appreciated!

-- 
  Henry PrĂȘcheur
--- Makefile.inc        Wed Jul  1 17:16:48 2009
+++ Makefile.inc.orig   Wed Jul  1 17:10:52 2009
@@ -71,8 +71,6 @@
 FULLPKGNAME-tkinter=   python-tkinter-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
 FULLPKGNAME-tools=     python-tools-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
 
-PYBIN_SUFFIX?=
-
 .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || 
${MACHINE_ARCH} == "sparc64"
 PKG_ARGS+=     -Dmm=0
 .else
@@ -117,7 +115,7 @@
        @cd ${WRKSRC} && ${MAKE_PROGRAM} Makefile
 
 post-install:
-       ${INSTALL_SCRIPT} ${WRKSRC}/Tools/scripts/pydoc${PYBIN_SUFFIX} \
+       ${INSTALL_SCRIPT} ${WRKSRC}/Tools/scripts/pydoc \
                ${PREFIX}/bin/pydoc${VERSION}
        @sed -e "s,@VERSION@,${VERSION},g" -e "s,@LOCALBASE@,${LOCALBASE},g" \
                ${FILESDIR}/idle > ${WRKSRC}/idle

Reply via email to