[csw-devel] SF.net SVN: gar:[21514] csw/mgar/pkg/lang-python/python/branches/python-2.7

Maciej (Matchek) Bliziński maciej at opencsw.org
Thu Jul 18 13:22:49 CEST 2013


In general, I'd try to patch as little as possible. There are a lot of
patches in this build, maybe not all are actually necessary. For the
2.7 build, I would start with a completely clean build with no patches
and only patch when something is actually broken. Many issues from 2.6
are fixed in 2.7 trunk and no patches are necessary any more.

2013/7/17 <pfelecan at users.sourceforge.net>
>
> Revision: 21514
>           http://gar.svn.sourceforge.net/gar/?rev=21514&view=rev
> Author:   pfelecan
> Date:     2013-07-17 08:39:16 +0000 (Wed, 17 Jul 2013)
> Log Message:
> -----------
> lang-python/python/branches/python-2.7:
> - transformed the majority of old style patches to gar style patches
>   and adapt to the 2.7 sources

Right, this is what I think is a generally bad idea. Many of the 2.6
patches are unnecessary.

> - explore using a non versioned destination directory in order to
>   aleviate the transition from the previous version

The unversioned directory is a bad, bad, horrible idea.

> Modified Paths:
> --------------
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/Makefile
>
> Added Paths:
> -----------
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0001-setup.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0002-faqwiz.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0003-makesetup.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0004-modules.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0005-multiprocess.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0006-python-config-in.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0007-pyport.patch
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0008-site.patch
>
> Removed Paths:
> -------------
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/faqwiz.diff
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/makesetup.diff
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/modules.diff
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/multiprocess.diff
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/pyport.diff
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/python-config-in.diff
>     csw/mgar/pkg/lang-python/python/branches/python-2.7/files/setup.diff
>
> Modified: csw/mgar/pkg/lang-python/python/branches/python-2.7/Makefile
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/Makefile        2013-07-17 08:01:49 UTC (rev 21513)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/Makefile        2013-07-17 08:39:16 UTC (rev 21514)
> @@ -38,25 +38,38 @@
>  DISTFILES += pyport.h
>
>  # Patches
> -PATCHFILES += faqwiz.diff
> -PATCHFILES += makesetup.diff
> -PATCHFILES += modules.diff
> -PATCHFILES += multiprocess.diff
> -PATCHFILES += pyport.diff
> -# This patch needs to go away
> -# PATCHFILES += site.diff
> -PATCHFILES += python-config-in.diff
> -PATCHFILES += setup.diff
> -# PATCHFILES += 0001-FFI_DEFAULT_ABI-to-use-__i386.patch
> +PATCHFILES += 0001-setup.patch
> +PATCHFILES += 0002-faqwiz.patch
> +PATCHFILES += 0003-makesetup.patch
> +PATCHFILES += 0004-modules.patch
> +PATCHFILES += 0005-multiprocess.patch
> +PATCHFILES += 0006-python-config-in.patch
> +PATCHFILES += 0007-pyport.patch
> +# after experiments and failures I think that with the upstream
> +# byzantine build system using a generic /opt/csw/lib/python directory
> +# is not such a good idea, e.g. there are interferences in early
> +# stages of the build when not all shared objects are built,
> +# e.g. cStringIO, and the system falls back on the 2.6 provided one,
> +# if the previous version is installed, and havoc ensues... Building
> +# without previous Python installed works.
> +PATCHFILES += 0008-site.patch
>
> +# TODO: evaluate the following patches from this branch files directory:
> +# 0001-FFI_DEFAULT_ABI-to-use-__i386.patch
> +# getpass.patch
> +# patch_2.diff.txt
> +# and review the complement patches from the trunk's files directory
> +
>  # The test for sunaudiodev fails.  Not that it's a good practice to skip
>  # tests.
>  #SKIPTEST = 1
>  TEST_SCRIPTS = custom
>
> -BUILD64 = 1
> +# for a faster turn-around:
> +#BUILD64 = 1
>
>  GARCOMPILER    =       GNU
> +GARFLAVOR = DBG
>  EXTRA_INC += $(prefix)/bdb47/include
>  EXTRA_LIB += $(prefix)/bdb47/lib
>
> @@ -79,7 +92,6 @@
>  CONFIGURE_ARGS += --enable-shared
>  CONFIGURE_ARGS += --enable-ipv6
>  CONFIGURE_ARGS += --enable-unicode=ucs4
> -CONFIGURE_ARGS += --without-gcc
>  CONFIGURE_ARGS += --with-signal-module
>  CONFIGURE_ARGS += --with-fpectl
>  CONFIGURE_ARGS += --with-system-ffi
> @@ -145,16 +157,16 @@
>  RUNTIME_DEP_PKGS_CSWpython$(CVER)-tk    += CSWpython$(CVER)
>
>  # Don't merge test files.
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/test
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/test/.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/bsddb/test.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/ctypes/test.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/email/test.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/distutils/tests.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/json/tests.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/lib2to3/tests.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/sqlite3/test.*
> -EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python$(VER)/unittest/test.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/test
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/test/.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/bsddb/test.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/ctypes/test.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/email/test.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/distutils/tests.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/json/tests.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/lib2to3/tests.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/sqlite3/test.*
> +EXTRA_MERGE_EXCLUDE_FILES += $(libdir)/python/unittest/test.*

No, no! This is horrible, pleas do not do the /opt/csw/lib/

>
>  BUILD_DEP_PKGS += CSWlibffi-dev
>  BUILD_DEP_PKGS += CSWggettext-dev
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0001-setup.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0001-setup.patch                          (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0001-setup.patch  2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,111 @@
> +From d2205faf194d7cc3adfc11a0f8f58e6e75f4da7a Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 11:43:50 +0200
> +Subject: [PATCH] setup
> +
> +based on the 2.6 site.diff with adaptations
> +---
> + setup.py | 36 ++++++++++++++++++++++--------------
> + 1 file changed, 22 insertions(+), 14 deletions(-)
> +
> +diff --git a/setup.py b/setup.py
> +index 716f08e..fc58444 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -436,9 +436,9 @@ class PyBuildExt(build_ext):
> +             os.unlink(tmpfile)
> +
> +     def detect_modules(self):
> +-        # Ensure that /usr/local is always used
> +-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
> +-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')

Maybe /usr/local should stay? Is there a reason to remove it?

> ++        # Ensure that /opt/csw is always used
> ++        add_dir_to_list(self.compiler.library_dirs, '/opt/csw/lib')
> ++        add_dir_to_list(self.compiler.include_dirs, '/opt/csw/include')
> +         self.add_gcc_paths()
> +         self.add_multiarch_paths()
> +
> +@@ -783,7 +783,7 @@ class PyBuildExt(build_ext):
> +                                libraries=math_libs) )
> +         # Detect SSL support for the socket module (via _ssl)
> +         search_for_ssl_incs_in = [
> +-                              '/usr/local/ssl/include',

As above.

> ++                              '/opt/csw/ssl/include',
> +                               '/usr/contrib/ssl/include/'
> +                              ]
> +         ssl_incs = find_file('openssl/ssl.h', inc_dirs,
> +@@ -795,7 +795,7 @@ class PyBuildExt(build_ext):
> +             if krb5_h:
> +                 ssl_incs += krb5_h
> +         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
> +-                                     ['/usr/local/ssl/lib',
> ++                                     ['/opt/csw/ssl/lib',
> +                                       '/usr/contrib/ssl/lib/'
> +                                      ] )
> +
> +@@ -920,10 +920,10 @@ class PyBuildExt(build_ext):
> +         # top of the normal inc_dirs.
> +         db_inc_paths = [
> +             '/usr/include/db4',
> +-            '/usr/local/include/db4',
> ++            '/opt/csw/include/db4',
> +             '/opt/sfw/include/db4',
> +             '/usr/include/db3',
> +-            '/usr/local/include/db3',
> ++            '/opt/csw/include/db3',
> +             '/opt/sfw/include/db3',
> +             # Fink defaults (http://fink.sourceforge.net/)
> +             '/sw/include/db4',
> +@@ -933,8 +933,8 @@ class PyBuildExt(build_ext):
> +         for x in gen_db_minor_ver_nums(4):
> +             db_inc_paths.append('/usr/include/db4%d' % x)
> +             db_inc_paths.append('/usr/include/db4.%d' % x)
> +-            db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
> +-            db_inc_paths.append('/usr/local/include/db4%d' % x)
> ++            db_inc_paths.append('/opt/csw/BerkeleyDB.4.%d/include' % x)
> ++            db_inc_paths.append('/opt/csw/include/db4%d' % x)
> +             db_inc_paths.append('/pkg/db-4.%d/include' % x)
> +             db_inc_paths.append('/opt/db-4.%d/include' % x)
> +             # MacPorts default (http://www.macports.org/)
> +@@ -942,8 +942,8 @@ class PyBuildExt(build_ext):
> +         # 3.x minor number specific paths
> +         for x in gen_db_minor_ver_nums(3):
> +             db_inc_paths.append('/usr/include/db3%d' % x)
> +-            db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
> +-            db_inc_paths.append('/usr/local/include/db3%d' % x)
> ++            db_inc_paths.append('/opt/csw/BerkeleyDB.3.%d/include' % x)
> ++            db_inc_paths.append('/opt/csw/include/db3%d' % x)
> +             db_inc_paths.append('/pkg/db-3.%d/include' % x)
> +             db_inc_paths.append('/opt/db-3.%d/include' % x)
> +
> +@@ -1094,9 +1094,9 @@ class PyBuildExt(build_ext):
> +         sqlite_inc_paths = [ '/usr/include',
> +                              '/usr/include/sqlite',
> +                              '/usr/include/sqlite3',
> +-                             '/usr/local/include',
> +-                             '/usr/local/include/sqlite',
> +-                             '/usr/local/include/sqlite3',
> ++                             '/opt/csw/include',
> ++                             '/opt/csw/include/sqlite',
> ++                             '/opt/csw/include/sqlite3',
> +                            ]
> +         if cross_compiling:
> +             sqlite_inc_paths = []
> +@@ -1555,6 +1555,14 @@ class PyBuildExt(build_ext):
> +             macros = dict()
> +             libraries = []
> +
> ++        elif host_platform == 'sunos5':
> ++            macros = dict(                  # Solaris
> ++                HAVE_SEM_OPEN=0,        # Not Implemented
> ++                HAVE_SEM_TIMEDWAIT=0,   # Not Implemented

I'd check if these are unimplemented in Solaris 10, or maybe this
patch is a carryover from Solaris 9 and not necessary any more?

> ++                HAVE_FD_TRANSFER=1,
> ++                )
> ++            libraries = ['rt']
> ++
> +         else:                                   # Linux and other unices
> +             macros = dict()
> +             libraries = ['rt']
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0002-faqwiz.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0002-faqwiz.patch                         (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0002-faqwiz.patch 2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,26 @@
> +From 0dc3e5cd576a09af3d88a00c473291b7c2cb0d3f Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 12:58:31 +0200
> +Subject: [PATCH] faqwiz
> +
> +based on faqwiz.diff from 2.6
> +---
> + Tools/faqwiz/faqconf.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Tools/faqwiz/faqconf.py b/Tools/faqwiz/faqconf.py
> +index d1acd80..05d060a 100644
> +--- a/Tools/faqwiz/faqconf.py
> ++++ b/Tools/faqwiz/faqconf.py
> +@@ -21,7 +21,7 @@ OWNERNAME = "FAQ owner"                 # Name for feedback
> + OWNEREMAIL = "nobody at anywhere.org"      # Email for feedback
> + HOMEURL = "http://www.python.org"       # Related home page
> + HOMENAME = "Python home"                # Name of related home page
> +-RCSBINDIR = "/usr/local/bin/"           # Directory containing RCS commands
> ++RCSBINDIR = "/opt/csw/bin/"           # Directory containing RCS commands
> +                                         # (must end in a slash)
> +
> + # Parameters you can normally leave alone
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0003-makesetup.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0003-makesetup.patch                              (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0003-makesetup.patch      2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,35 @@
> +From 337c51f7a5c0f68561d415aefc7ba889a3897a13 Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 13:49:06 +0200
> +Subject: [PATCH] makesetup
> +
> +based on makesetup from 2.6
> +---
> + Modules/makesetup | 9 +++++++--
> + 1 file changed, 7 insertions(+), 2 deletions(-)
> +
> +diff --git a/Modules/makesetup b/Modules/makesetup
> +index 8862c36..c28e3a8 100755
> +--- a/Modules/makesetup
> ++++ b/Modules/makesetup
> +@@ -214,10 +214,15 @@ sed -e 's/[      ]*#.*//' -e '/^[        ]*$/d' |
> +                       glmodule.c) ;;
> +                       /*) ;;
> +                       \$*) ;;
> +-                      *) src='$(srcdir)/'"$srcdir/$src";;
> ++                      *)  src='$(srcdir)/'"$srcdir/$src";;
> +                       esac
> +                       case $doconfig in
> +-                      no)     cc="$cc \$(CCSHARED) \$(CFLAGS) \$(CPPFLAGS)";;
> ++                      no)     case $src in
> ++                *bsddb.*)
> ++                    cc="$cc -I\$(DBINC) \$(CCSHARED) \$(CFLAGS) \$(CPPFLAGS)";;
> ++                *)
> ++                    cc="$cc  \$(CCSHARED) \$(CFLAGS) \$(CPPFLAGS)";;
> ++                esac;;
> +                       *)
> +                               cc="$cc \$(PY_CFLAGS)";;
> +                       esac
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0004-modules.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0004-modules.patch                                (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0004-modules.patch        2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,30 @@
> +From 74b002eee8ef49739c50073c20233dab2bacc25b Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 14:05:03 +0200
> +Subject: [PATCH] modules
> +
> +based on modules.diff from 2.6
> +---
> + Modules/Setup.dist | 5 +++--
> + 1 file changed, 3 insertions(+), 2 deletions(-)
> +
> +diff --git a/Modules/Setup.dist b/Modules/Setup.dist
> +index 2ad1aa3..04f7bc1 100644
> +--- a/Modules/Setup.dist
> ++++ b/Modules/Setup.dist
> +@@ -367,9 +367,10 @@ GLHACK=-Dclear=__GLclear
> + #
> + # First, look at Setup.config; configure may have set this for you.
> +
> +-#_curses _cursesmodule.c -lcurses -ltermcap
> ++*shared*
> ++_curses _cursesmodule.c -R/opt/csw/lib -L/opt/csw/lib -lcurses -lncursesw -lxtermcap
> + # Wrapper for the panel library that's part of ncurses and SYSV curses.
> +-#_curses_panel _curses_panel.c -lpanel -lncurses
> ++_curses_panel _curses_panel.c -R/opt/csw/lib -L/opt/csw/lib -lcurses -lpanel -lncursesw -lxtermcap
> +
> +
> + # Generic (SunOS / SVR4) dynamic loading module.
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0005-multiprocess.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0005-multiprocess.patch                           (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0005-multiprocess.patch   2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,56 @@
> +From b4da8e66d1a74bad609e0b6f585670a4180d0bb0 Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 14:16:24 +0200
> +Subject: [PATCH] multiprocess
> +
> +based on multiprocess.diff from 2.6
> +---
> + Modules/_multiprocessing/multiprocessing.h | 25 +++++++++++++++++++++++++
> + 1 file changed, 25 insertions(+)
> +
> +diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h
> +index 14425de..c9fd187 100644
> +--- a/Modules/_multiprocessing/multiprocessing.h
> ++++ b/Modules/_multiprocessing/multiprocessing.h
> +@@ -48,6 +48,20 @@
> + #endif
> +
> + /*
> ++ * Solaris 8 missing CMSG_SPACE and CMSG_LEN

This patch is for Solaris 8 and probably not necessary.

> ++ */
> ++#ifndef CMSG_SPACE
> ++#  define CMSG_SPACE(l)       (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + \
> ++                                      _CMSG_HDR_ALIGN(l))
> ++#  warning "assuming 4-byte alignment for CMSG_SPACE"
> ++#endif  /* CMSG_SPACE */
> ++
> ++#ifndef CMSG_LEN
> ++#  define CMSG_LEN(l)         (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + (l))
> ++#  warning "assuming 4-byte alignment for CMSG_LEN"
> ++#endif /* CMSG_LEN */
> ++
> ++/*
> +  * Issue 3110 - Solaris does not define SEM_VALUE_MAX
> +  */
> + #ifndef SEM_VALUE_MAX
> +@@ -64,6 +78,17 @@
> +
> +
> + /*
> ++ * Issue 3110 - Solaris does not define SEM_VALUE_MAX
> ++ */

It might not apply to Solaris 10.

> ++#ifndef SEM_VALUE_MAX
> ++#  ifdef _SEM_VALUE_MAX
> ++#    define SEM_VALUE_MAX _SEM_VALUE_MAX
> ++#  else
> ++#    define SEM_VALUE_MAX INT_MAX
> ++#  endif
> ++#endif
> ++
> ++/*
> +  * Make sure Py_ssize_t available
> +  */
> +
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0006-python-config-in.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0006-python-config-in.patch                               (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0006-python-config-in.patch       2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,24 @@
> +From 220ff3d78b11ae5e1f00c42f20b77d8898156ca1 Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 14:41:26 +0200
> +Subject: [PATCH] python config in
> +
> +based on python-config-in.diff from 2.6 with adaptations
> +---
> + Misc/python-config.in | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/Misc/python-config.in b/Misc/python-config.in
> +index ca9857a..40d5357 100644
> +--- a/Misc/python-config.in
> ++++ b/Misc/python-config.in
> +@@ -53,5 +53,6 @@ for opt in opt_flags:
> +                 libs.insert(0, '-L' + getvar('LIBPL'))
> +             if not getvar('PYTHONFRAMEWORK'):
> +                 libs.extend(getvar('LINKFORSHARED').split())
> ++            libs.insert(0, '-R/opt/csw/lib/$ISALIST -L/opt/csw/lib')
> +         print ' '.join(libs)
> +
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0007-pyport.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0007-pyport.patch                         (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0007-pyport.patch 2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,29 @@
> +From 9a42a63a00b689fa655a0b9323b72eade67e0de9 Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Mon, 15 Jul 2013 14:51:36 +0200
> +Subject: [PATCH] pyport
> +
> +based on pyport.diff from 2.6
> +---
> + Include/pyport.h | 5 -----
> + 1 file changed, 5 deletions(-)
> +
> +diff --git a/Include/pyport.h b/Include/pyport.h
> +index 85e852f..c1fea29 100644
> +--- a/Include/pyport.h
> ++++ b/Include/pyport.h
> +@@ -640,11 +640,6 @@ Please be conservative with adding new ones, document them and enclose them
> + in platform-specific #ifdefs.
> + **************************************************************************/
> +
> +-#ifdef SOLARIS
> +-/* Unchecked */
> +-extern int gethostname(char *, int);
> +-#endif

Is this still necessary in 2.7? It didn't seem to be when I was building it.

> +-
> + #ifdef __BEOS__
> + /* Unchecked */
> + /* It's in the libs, but not the headers... - [cjh] */
> +--
> +1.8.3.1
> +
>
> Added: csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0008-site.patch
> ===================================================================
> --- csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0008-site.patch                           (rev 0)
> +++ csw/mgar/pkg/lang-python/python/branches/python-2.7/files/0008-site.patch   2013-07-17 08:39:16 UTC (rev 21514)
> @@ -0,0 +1,161 @@
> +From aba7368c957a565f1f2b3770aaef3fe950816a1b Mon Sep 17 00:00:00 2001
> +From: Peter Felecan <pfelecan at opencsw.org>
> +Date: Tue, 16 Jul 2013 16:59:44 +0200
> +Subject: [PATCH] site
> +
> +based on site.diff from 2.6 with adaptations
> +---
> + Lib/distutils/sysconfig.py |  2 +-
> + Lib/site.py                |  2 +-
> + Lib/sysconfig.py           | 32 ++++++++++++++++----------------
> + Lib/trace.py               |  4 ++--
> + Makefile.pre.in            |  6 +++---
> + Modules/getpath.c          |  6 +++---
> + 6 files changed, 26 insertions(+), 26 deletions(-)
> +
> +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
> +index 0c726d9..a9ada72 100644
> +--- a/Lib/distutils/sysconfig.py
> ++++ b/Lib/distutils/sysconfig.py
> +@@ -120,7 +120,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
> +
> +     if os.name == "posix":
> +         libpython = os.path.join(prefix,
> +-                                 "lib", "python" + get_python_version())
> ++                                 "lib", "python")
> +         if standard_lib:
> +             return libpython
> +         else:
> +diff --git a/Lib/site.py b/Lib/site.py
> +index f1b0ae8..be21919 100644
> +--- a/Lib/site.py
> ++++ b/Lib/site.py
> +@@ -289,7 +289,7 @@ def getsitepackages():
> +             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
> +         elif os.sep == '/':
> +             sitepackages.append(os.path.join(prefix, "lib",
> +-                                        "python" + sys.version[:3],
> ++                                        "python",

This is the source of most of our Python woe. Please kill it with fire.

> +                                         "site-packages"))
> +             sitepackages.append(os.path.join(prefix, "lib", "site-python"))
> +         else:
> +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
> +index aa69351..b177b61 100644
> +--- a/Lib/sysconfig.py
> ++++ b/Lib/sysconfig.py
> +@@ -7,12 +7,12 @@ from os.path import pardir, realpath
> +
> + _INSTALL_SCHEMES = {
> +     'posix_prefix': {
> +-        'stdlib': '{base}/lib/python{py_version_short}',
> +-        'platstdlib': '{platbase}/lib/python{py_version_short}',
> +-        'purelib': '{base}/lib/python{py_version_short}/site-packages',
> +-        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
> +-        'include': '{base}/include/python{py_version_short}',
> +-        'platinclude': '{platbase}/include/python{py_version_short}',
> ++        'stdlib': '{base}/lib/python',
> ++        'platstdlib': '{platbase}/lib/python',
> ++        'purelib': '{base}/lib/python/site-packages',
> ++        'platlib': '{platbase}/lib/python/site-packages',
> ++        'include': '{base}/include/python',
> ++        'platinclude': '{platbase}/include/python',

These I'm not sure about. Are they necessary? It's likely they're not.

> +         'scripts': '{base}/bin',
> +         'data': '{base}',
> +         },
> +@@ -47,11 +47,11 @@ _INSTALL_SCHEMES = {
> +         'data'   : '{base}',
> +         },
> +     'os2_home': {
> +-        'stdlib': '{userbase}/lib/python{py_version_short}',
> +-        'platstdlib': '{userbase}/lib/python{py_version_short}',
> +-        'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
> +-        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
> +-        'include': '{userbase}/include/python{py_version_short}',
> ++        'stdlib': '{userbase}/lib/python',
> ++        'platstdlib': '{userbase}/lib/python',
> ++        'purelib': '{userbase}/lib/python/site-packages',
> ++        'platlib': '{userbase}/lib/python/site-packages',
> ++        'include': '{userbase}/include/python',
> +         'scripts': '{userbase}/bin',
> +         'data'   : '{userbase}',
> +         },
> +@@ -65,11 +65,11 @@ _INSTALL_SCHEMES = {
> +         'data'   : '{userbase}',
> +         },
> +     'posix_user': {
> +-        'stdlib': '{userbase}/lib/python{py_version_short}',
> +-        'platstdlib': '{userbase}/lib/python{py_version_short}',
> +-        'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
> +-        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
> +-        'include': '{userbase}/include/python{py_version_short}',
> ++        'stdlib': '{userbase}/lib/python',
> ++        'platstdlib': '{userbase}/lib/python',
> ++        'purelib': '{userbase}/lib/python/site-packages',
> ++        'platlib': '{userbase}/lib/python/site-packages',
> ++        'include': '{userbase}/include/python',
> +         'scripts': '{userbase}/bin',
> +         'data'   : '{userbase}',
> +         },

<snip>

Maciej


More information about the devel mailing list