diff options
Diffstat (limited to 'lang/python27/files')
-rw-r--r-- | lang/python27/files/extra-patch-setup.py | 5 | ||||
-rw-r--r-- | lang/python27/files/patch-Lib_distutils_command_build_scripts.py | 17 | ||||
-rw-r--r-- | lang/python27/files/patch-Makefile.pre.in | 36 | ||||
-rw-r--r-- | lang/python27/files/patch-setup.py | 77 | ||||
-rw-r--r-- | lang/python27/files/pkg-message | 11 |
5 files changed, 97 insertions, 49 deletions
diff --git a/lang/python27/files/extra-patch-setup.py b/lang/python27/files/extra-patch-setup.py index 8a8094b17fcb..ceeb335e319c 100644 --- a/lang/python27/files/extra-patch-setup.py +++ b/lang/python27/files/extra-patch-setup.py @@ -1,6 +1,9 @@ +# Description: SEM option patch. If SEM is enabled, enable the build properly +# Not upstreamed + --- setup.py.orig 2013-04-07 11:07:43.000000000 +0400 +++ setup.py 2013-04-07 11:16:36.000000000 +0400 -@@ -1544,10 +1544,22 @@ +@@ -1551,10 +1551,22 @@ macros = dict() libraries = [] diff --git a/lang/python27/files/patch-Lib_distutils_command_build_scripts.py b/lang/python27/files/patch-Lib_distutils_command_build_scripts.py new file mode 100644 index 000000000000..41b6b0e75355 --- /dev/null +++ b/lang/python27/files/patch-Lib_distutils_command_build_scripts.py @@ -0,0 +1,17 @@ +# Description: A non-invasive partial backport of the Python3 distutils behaviour. +# This allows Python's scripts to be properly suffixed (similar to Python 3.x) on +# installation. +# Submitted by: mva + +--- Lib/distutils/command/build_scripts.py.orig 2014-07-26 11:52:20.000000000 +0200 ++++ Lib/distutils/command/build_scripts.py 2014-07-26 11:52:56.000000000 +0200 +@@ -126,6 +126,9 @@ + file, oldmode, newmode) + os.chmod(file, newmode) + ++ # XXX should we modify self.outfiles? ++ return outfiles ++ + # copy_scripts () + + # class build_scripts diff --git a/lang/python27/files/patch-Makefile.pre.in b/lang/python27/files/patch-Makefile.pre.in index c0358eef5ca2..7773e0d8856b 100644 --- a/lang/python27/files/patch-Makefile.pre.in +++ b/lang/python27/files/patch-Makefile.pre.in @@ -1,6 +1,5 @@ -# Description: Fix out-of-tree build as a result of upstream #15819 -# Submitted by: rm (r318353) -# Issue ID: http://bugs.python.org/issue15819#msg203348 +# Description: Link scripts in the same way Python3 does +# Submitted by: mva # Description: Run pycompile only once # Submitted by: antoine (r350207) @@ -10,21 +9,22 @@ # Submitted by: antoine@ (r350207) # TODO: Upstream ---- ./Makefile.pre.in.orig 2013-11-10 07:36:41.000000000 +0000 -+++ ./Makefile.pre.in 2014-04-04 09:16:00.000000000 +0000 -@@ -285,9 +285,9 @@ +--- Makefile.pre.in.orig 2014-06-30 04:05:39.000000000 +0200 ++++ Makefile.pre.in 2014-07-26 11:09:46.000000000 +0200 +@@ -868,6 +868,12 @@ + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc) + -rm -f $(DESTDIR)$(LIBPC)/python.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python2.pc python.pc) ++ -rm -f $(DESTDIR)$(BINDIR)/idle ++ (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle2) ++ -rm -f $(DESTDIR)$(BINDIR)/pydoc ++ (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc2) ++ -rm -f $(DESTDIR)$(BINDIR)/2to3 ++ (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) - ########################################################################## - # AST --AST_H_DIR= Include -+AST_H_DIR= $(srcdir)/Include - AST_H= $(AST_H_DIR)/Python-ast.h --AST_C_DIR= Python -+AST_C_DIR= $(srcdir)/Python - AST_C= $(AST_C_DIR)/Python-ast.c - AST_ASDL= $(srcdir)/Parser/Python.asdl - -@@ -1006,12 +1006,12 @@ + # Install the interpreter with $(VERSION) affixed + # This goes into $(exec_prefix) +@@ -1010,12 +1016,12 @@ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ @@ -39,7 +39,7 @@ -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) -@@ -1089,8 +1089,8 @@ +@@ -1093,8 +1099,8 @@ if test "$(SO)" = .dll; then \ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ else \ diff --git a/lang/python27/files/patch-setup.py b/lang/python27/files/patch-setup.py index 13fdd368cdda..f6fae7871aeb 100644 --- a/lang/python27/files/patch-setup.py +++ b/lang/python27/files/patch-setup.py @@ -1,6 +1,21 @@ ---- ./setup.py.orig 2014-07-04 18:02:21.711919294 +1000 -+++ ./setup.py 2014-07-04 18:11:14.642091269 +1000 -@@ -33,7 +33,7 @@ +# Description: Partial script installation backport from Python3 +# Submitted by: mva + +# Description: Some modules are installed via other ports + +# Description: ossaudiodev detection fix backport + +--- setup.py.orig 2014-06-30 04:05:48.000000000 +0200 ++++ setup.py 2014-07-26 14:51:29.000000000 +0200 +@@ -15,6 +15,7 @@ + from distutils.command.build_ext import build_ext + from distutils.command.install import install + from distutils.command.install_lib import install_lib ++from distutils.command.build_scripts import build_scripts + from distutils.spawn import find_executable + + cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ +@@ -33,7 +34,7 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) # This global variable is used to hold the list of modules to be disabled. @@ -9,16 +24,7 @@ def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -867,6 +867,8 @@ - # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash - exts.append( Extension('_sha256', ['sha256module.c']) ) - exts.append( Extension('_sha512', ['sha512module.c']) ) -+ else: -+ open('.without_own_sha', 'w') - - # Modules that provide persistent dictionary-like semantics. You will - # probably want to arrange for at least one of them to be available on -@@ -1212,7 +1214,7 @@ +@@ -1212,7 +1213,7 @@ sysroot = macosx_sdk_root() f = os.path.join(sysroot, f[1:]) @@ -27,7 +33,7 @@ data = open(f).read() m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) if m is not None: -@@ -1551,7 +1553,7 @@ +@@ -1551,7 +1552,7 @@ macros = dict() libraries = [] @@ -36,7 +42,7 @@ # FreeBSD's P1003.1b semaphore support is very experimental # and has many known problems. (as of June 2008) macros = dict() -@@ -1602,9 +1604,10 @@ +@@ -1602,9 +1603,10 @@ else: missing.append('linuxaudiodev') @@ -50,14 +56,47 @@ exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) else: missing.append('ossaudiodev') -@@ -2228,9 +2231,7 @@ - ext_modules=[Extension('_struct', ['_struct.c'])], +@@ -2176,6 +2178,22 @@ + def is_chmod_supported(self): + return hasattr(os, 'chmod') + ++class PyBuildScripts(build_scripts): ++ def copy_scripts(self): ++ outfiles = build_scripts.copy_scripts(self) ++ fullversion = '{0[0]}.{0[1]}'.format(sys.version_info) ++ newoutfiles = [] ++ for filename in outfiles: ++ if filename.endswith('2to3'): ++ newfilename = filename + '-' + fullversion ++ else: ++ newfilename = filename + fullversion ++ log.info('renaming {} to {}'.format(filename, newfilename)) ++ os.rename(filename, newfilename) ++ newoutfiles.append(newfilename) ++ return newoutfiles ++ ++ + SUMMARY = """ + Python is an interpreted, interactive, object-oriented programming + language. It is often compared to Tcl, Perl, Scheme or Java. +@@ -2221,7 +2239,9 @@ + platforms = ["Many"], + + # Build info +- cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall, ++ cmdclass = {'build_ext':PyBuildExt, ++ 'build_scripts':PyBuildScripts, ++ 'install':PyBuildInstall, + 'install_lib':PyBuildInstallLib}, + # The struct module is defined here, because build_ext won't be + # called unless there's at least one extension module defined. +@@ -2229,8 +2249,7 @@ # Scripts to install -- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', + scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', - 'Tools/scripts/2to3', - 'Lib/smtpd.py'] -+ scripts = [] ++ 'Tools/scripts/2to3'] ) # --install-platlib diff --git a/lang/python27/files/pkg-message b/lang/python27/files/pkg-message deleted file mode 100644 index 80afa60e7c7b..000000000000 --- a/lang/python27/files/pkg-message +++ /dev/null @@ -1,11 +0,0 @@ -===================================================================== - -Note that some standard Python modules are provided as separate ports -as they require additional dependencies. They are available as: - -bsddb databases/py-bsddb -gdbm databases/py-gdbm -sqlite3 databases/py-sqlite3 -tkinter x11-toolkits/py-tkinter - -===================================================================== |