Exemplo n.º 1
0
 def _patch(self):
     version = Version(self.pkg.version)
     common_patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._append_patch(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._append_patch(patch_dir, ['patch-setup.py.diff', 'patch-svnversion.patch'])
     elif is_python26(version):
         self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
         if version < '2.6.5':
             self._append_patch(patch_dir, ['patch-nosslv2-1.diff'])
         elif version < '2.6.6':
             self._append_patch(patch_dir, ['patch-nosslv2-2.diff'])
         elif version < '2.6.9':
             self._append_patch(patch_dir, ['patch-nosslv2-3.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._append_patch(patch_dir, ['patch-setup.py.diff',
                                        'patch-nosslv2.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._append_patch(patch_dir, ['patch-setup.py.diff'])
Exemplo n.º 2
0
 def _patch(self):
     version = Version(self.pkg.version)
     common_patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._append_patch(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._append_patch(patch_dir, ['patch-setup.py.diff', 'patch-svnversion.patch'])
     elif is_python26(version):
         self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
         if version < '2.6.5':
             self._append_patch(patch_dir, ['patch-nosslv2-1.diff'])
         elif version < '2.6.6':
             self._append_patch(patch_dir, ['patch-nosslv2-2.diff'])
         elif version < '2.6.9':
             self._append_patch(patch_dir, ['patch-nosslv2-3.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._append_patch(patch_dir, ['patch-setup.py.diff',
                                        'patch-nosslv2.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._append_patch(patch_dir, ['patch-setup.py.diff'])
Exemplo n.º 3
0
 def _patch_osx(self):
     version = Version(self.pkg.version)
     if is_python24(version):
         PATH_PATCHES_OSX_PYTHON24 = os.path.join(PATH_PATCHES_OSX, "python24")
         if version == '2.4':
             self._append_patch(PATH_PATCHES_OSX_PYTHON24, ['patch240-configure', 'patch240-setup.py.diff', 'patch240-Mac-OSX-Makefile.in', 'patch240-gestaltmodule.c.diff', 'patch240-sysconfig.py.diff'])
         elif version < '2.4.4':
             self._append_patch(PATH_PATCHES_OSX_PYTHON24, ['patch241-configure', 'patch240-setup.py.diff', 'patch240-Mac-OSX-Makefile.in', 'patch240-gestaltmodule.c.diff'])
         else:
             self._append_patch(PATH_PATCHES_OSX_PYTHON24, ['patch244-configure', 'patch244-setup.py.diff', 'patch244-Mac-OSX-Makefile.in', 'patch244-gestaltmodule.c.diff'])
         self._append_patch(PATH_PATCHES_OSX_PYTHON24, [
                                               'patch-Makefile.pre.in',
                                               'patch-Lib-cgi.py.diff',
                                               'patch-Lib-site.py.diff',
                                               'patch-Include-pyport.h',
                                               'patch-configure-badcflags.diff',
                                               'patch-macosmodule.diff',
                                               'patch-mactoolboxglue.diff',
                                               'patch-pymactoolbox.diff'])
     elif is_python25(version):
         PATH_PATCHES_OSX_PYTHON25 = os.path.join(PATH_PATCHES_OSX, "python25")
         if version == '2.5':
             self._append_patch(PATH_PATCHES_OSX_PYTHON25, ['patch250-setup.py.diff'])
         elif version == '2.5.1':
             self._append_patch(PATH_PATCHES_OSX_PYTHON25, ['patch251-setup.py.diff'])
         else:
             self._append_patch(PATH_PATCHES_OSX_PYTHON25, ['patch252-setup.py.diff'])
         self._append_patch(PATH_PATCHES_OSX_PYTHON25, [
                                               'patch-Makefile.pre.in.diff',
                                               'patch-Lib-cgi.py.diff',
                                               'patch-Lib-distutils-dist.py.diff',
                                               'patch-configure-badcflags.diff',
                                               'patch-configure-arch_only.diff',
                                               'patch-64bit.diff',
                                               'patch-pyconfig.h.in.diff',
                                               'patch-gestaltmodule.c.diff',
                                               {'_localemodule.c.ed': 'Modules/_localemodule.c'},
                                               {'locale.py.ed': 'Lib/locale.py'}])
     elif is_python26(version):
         PATH_PATCHES_OSX_PYTHON26 = os.path.join(PATH_PATCHES_OSX, "python26")
         self._append_patch(PATH_PATCHES_OSX_PYTHON26, [
                                               'patch-Lib-cgi.py.diff',
                                               'patch-Lib-distutils-dist.py.diff',
                                               'patch-Mac-IDLE-Makefile.in.diff',
                                               'patch-Mac-Makefile.in.diff',
                                               'patch-Mac-PythonLauncher-Makefile.in.diff',
                                               'patch-Mac-Tools-Doc-setup.py.diff',
                                               'patch-setup.py-db46.diff',
                                               'patch-Lib-ctypes-macholib-dyld.py.diff',
                                               'patch-setup_no_tkinter.py.diff',
                                               {'_localemodule.c.ed': 'Modules/_localemodule.c'},
                                               {'locale.py.ed': 'Lib/locale.py'}])
     elif is_python27(version):
         PATH_PATCHES_OSX_PYTHON27 = os.path.join(PATH_PATCHES_OSX, "python27")
         self._append_patch(PATH_PATCHES_OSX_PYTHON27, [
                                               'patch-Modules-posixmodule.diff'])
Exemplo n.º 4
0
 def _patch(self):
     version = Version(self.pkg.version)
     common_patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
     if is_python26(version) or is_python25(version) or is_python24(version):
         self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._append_patch(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._append_patch(patch_dir, ['patch-setup.py.diff'])
Exemplo n.º 5
0
 def _patch_osx(self):
     version = Version(self.pkg.version)
     if is_python26(version):
         patch_dir = PATH_PATCHES_MACOSX_PYTHON26
         self._append_patch(patch_dir, ['patch-Lib-cgi.py.diff',
                                        'patch-Lib-distutils-dist.py.diff',
                                        'patch-Mac-IDLE-Makefile.in.diff',
                                        'patch-Mac-Makefile.in.diff',
                                        'patch-Mac-PythonLauncher-Makefile.in.diff',
                                        'patch-Mac-Tools-Doc-setup.py.diff',
                                        'patch-setup.py-db46.diff',
                                        'patch-Lib-ctypes-macholib-dyld.py.diff',
                                        'patch-setup_no_tkinter.py.diff',
                                        {'_localemodule.c.ed': 'Modules/_localemodule.c'},
                                        {'locale.py.ed': 'Lib/locale.py'}])
     elif is_python27(version):
         patch_dir = PATH_PATCHES_MACOSX_PYTHON27
         self._append_patch(patch_dir, ['patch-Modules-posixmodule.diff'])
Exemplo n.º 6
0
 def _patch(self):
     version = Version(self.pkg.version)
     common_patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
     if is_python26(version) or is_python25(version) or is_python24(
             version):
         self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._append_patch(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             self._append_patch(common_patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._append_patch(patch_dir, ['patch-setup.py.diff'])
Exemplo n.º 7
0
    def patch(self):
        # note: want an interface to the source patching functionality. like a patchperl.
        version = Version(self.pkg.version)
        if is_python26(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON26
            self._add_patches_to_list(patch_dir, ['patch-Lib-cgi.py.diff',
                                                  'patch-Lib-distutils-dist.py.diff',
                                                  'patch-Mac-IDLE-Makefile.in.diff',
                                                  'patch-Mac-Makefile.in.diff',
                                                  'patch-Mac-PythonLauncher-Makefile.in.diff',
                                                  'patch-Mac-Tools-Doc-setup.py.diff',
                                                  'patch-setup.py-db46.diff',
                                                  'patch-Lib-ctypes-macholib-dyld.py.diff',
                                                  'patch-setup_no_tkinter.py.diff',
                                                  {'_localemodule.c.ed': 'Modules/_localemodule.c'},
                                                  {'locale.py.ed': 'Lib/locale.py'}])
        elif is_python27(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON27
            self._add_patches_to_list(patch_dir, ['patch-Modules-posixmodule.diff'])

        self._do_patch()
Exemplo n.º 8
0
 def _patch(self):
     version = Version(self.pkg.version)
     common_patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._append_patch(patch_dir, ["patch-setup.py.diff"])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._append_patch(patch_dir, ["patch-setup.py.diff", "patch-svnversion.patch"])
     elif is_python26(version):
         self._append_patch(common_patch_dir, ["patch-setup.py.diff"])
     elif is_python27(version):
         if version < "2.7.2":
             self._append_patch(common_patch_dir, ["patch-setup.py.diff"])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._append_patch(patch_dir, ["patch-setup.py.diff"])
     elif is_python31(version):
         if version < "3.1.4":
             self._append_patch(common_patch_dir, ["patch-setup.py.diff"])
     elif is_python32(version):
         if version == "3.2":
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._append_patch(patch_dir, ["patch-setup.py.diff"])
Exemplo n.º 9
0
 def _patch_osx(self):
     version = Version(self.pkg.version)
     if is_python24(version):
         PATH_PATCHES_OSX_PYTHON24 = os.path.join(PATH_PATCHES_OSX,
                                                  "python24")
         if version == '2.4':
             self._append_patch(PATH_PATCHES_OSX_PYTHON24, [
                 'patch240-configure', 'patch240-setup.py.diff',
                 'patch240-Mac-OSX-Makefile.in',
                 'patch240-gestaltmodule.c.diff',
                 'patch240-sysconfig.py.diff'
             ])
         elif version < '2.4.4':
             self._append_patch(PATH_PATCHES_OSX_PYTHON24, [
                 'patch241-configure', 'patch240-setup.py.diff',
                 'patch240-Mac-OSX-Makefile.in',
                 'patch240-gestaltmodule.c.diff'
             ])
         else:
             self._append_patch(PATH_PATCHES_OSX_PYTHON24, [
                 'patch244-configure', 'patch244-setup.py.diff',
                 'patch244-Mac-OSX-Makefile.in',
                 'patch244-gestaltmodule.c.diff'
             ])
         self._append_patch(PATH_PATCHES_OSX_PYTHON24, [
             'patch-Makefile.pre.in', 'patch-Lib-cgi.py.diff',
             'patch-Lib-site.py.diff', 'patch-Include-pyport.h',
             'patch-configure-badcflags.diff', 'patch-macosmodule.diff',
             'patch-mactoolboxglue.diff', 'patch-pymactoolbox.diff'
         ])
     elif is_python25(version):
         PATH_PATCHES_OSX_PYTHON25 = os.path.join(PATH_PATCHES_OSX,
                                                  "python25")
         if version == '2.5':
             self._append_patch(PATH_PATCHES_OSX_PYTHON25,
                                ['patch250-setup.py.diff'])
         elif version == '2.5.1':
             self._append_patch(PATH_PATCHES_OSX_PYTHON25,
                                ['patch251-setup.py.diff'])
         else:
             self._append_patch(PATH_PATCHES_OSX_PYTHON25,
                                ['patch252-setup.py.diff'])
         self._append_patch(PATH_PATCHES_OSX_PYTHON25, [
             'patch-Makefile.pre.in.diff', 'patch-Lib-cgi.py.diff',
             'patch-Lib-distutils-dist.py.diff',
             'patch-configure-badcflags.diff',
             'patch-configure-arch_only.diff', 'patch-64bit.diff',
             'patch-pyconfig.h.in.diff', 'patch-gestaltmodule.c.diff', {
                 '_localemodule.c.ed': 'Modules/_localemodule.c'
             }, {
                 'locale.py.ed': 'Lib/locale.py'
             }
         ])
     elif is_python26(version):
         PATH_PATCHES_OSX_PYTHON26 = os.path.join(PATH_PATCHES_OSX,
                                                  "python26")
         self._append_patch(PATH_PATCHES_OSX_PYTHON26, [
             'patch-Lib-cgi.py.diff', 'patch-Lib-distutils-dist.py.diff',
             'patch-Mac-IDLE-Makefile.in.diff',
             'patch-Mac-Makefile.in.diff',
             'patch-Mac-PythonLauncher-Makefile.in.diff',
             'patch-Mac-Tools-Doc-setup.py.diff',
             'patch-setup.py-db46.diff',
             'patch-Lib-ctypes-macholib-dyld.py.diff',
             'patch-setup_no_tkinter.py.diff', {
                 '_localemodule.c.ed': 'Modules/_localemodule.c'
             }, {
                 'locale.py.ed': 'Lib/locale.py'
             }
         ])
     elif is_python27(version):
         PATH_PATCHES_OSX_PYTHON27 = os.path.join(PATH_PATCHES_OSX,
                                                  "python27")
         self._append_patch(PATH_PATCHES_OSX_PYTHON27,
                            ['patch-Modules-posixmodule.diff'])