예제 #1
0
 def patch(self):
     version = Version(self.pkg.version)
     # for ubuntu 11.04(Natty)
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python26(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     self._do_patch()
예제 #2
0
 def patch(self):
     version = Version(self.pkg.version)
     # for ubuntu 11.04(Natty)
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python26(version):
         if version < '2.6.6':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
             self._add_patches_to_list(
                 patch_dir, ['patch-setup.py-for-2.6.5-and-earlier.diff'])
         else:
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     self._do_patch()
예제 #3
0
 def patch(self):
     version = Version(self.pkg.version)
     # for ubuntu 11.04(Natty)
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python26(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
         self._add_patches_to_list(patch_dir, ['patch-_ssl.c-for-ubuntu-oneiric-and-later.diff'])
         if version < '2.6.6':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
             self._add_patches_to_list(patch_dir, ['patch-setup.py-for-2.6.5-and-earlier.diff'])
         else:
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     self._do_patch()
예제 #4
0
    def patch(self):
        # note: want an interface to the source patching functionality. like a patchperl.
        version = Version(self.pkg.version)
        if is_python24(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON24
            self._add_patches_to_list(patch_dir, [
                'patch-configure', 'patch-Makefile.pre.in',
                'patch-Lib-cgi.py.diff', 'patch-Lib-site.py.diff',
                'patch-setup.py.diff', 'patch-Include-pyport.h',
                'patch-Mac-OSX-Makefile.in', 'patch-Mac-OSX-IDLE-Makefile.in',
                'patch-Mac-OSX-PythonLauncher-Makefile.in',
                'patch-configure-badcflags.diff',
                'patch-configure-arch_only.diff', 'patch-macosmodule.diff',
                'patch-mactoolboxglue.diff', 'patch-pymactoolbox.diff',
                'patch-gestaltmodule.c.diff'
            ])
        elif is_python25(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON25
            self._add_patches_to_list(patch_dir, [
                'patch-Makefile.pre.in.diff', 'patch-Lib-cgi.py.diff',
                'patch-Lib-distutils-dist.py.diff', 'patch-setup.py.diff',
                'patch-configure-badcflags.diff',
                'patch-configure-arch_only.diff',
                'patch-configure-no-posix-c-source.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):
            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):
            if version < '2.7.4':
                patch_dir = PATH_PATCHES_MACOSX_PYTHON27
                self._add_patches_to_list(patch_dir,
                                          ['patch-Modules-posixmodule.diff'])

        self._do_patch()
예제 #5
0
 def patch(self):
     version = Version(self.pkg.version)
     # for ubuntu 11.04(Natty)
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python26(version):
         if version < '2.6.6':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
             if version < '2.6.3':
                 self._add_patches_to_list(
                     patch_dir,
                     ['patch-Makefile.pre.in-for-2.6.2-and-earlier.diff'])
             self._add_patches_to_list(
                 patch_dir, ['patch-setup.py-for-2.6.5-and-earlier.diff'])
             self._add_patches_to_list(
                 patch_dir,
                 ['patch-_ssl.c-for-ubuntu-oneiric-and-later.diff'])
         else:
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
         if version == '2.7.3':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python27")
             self._add_patches_to_list(
                 patch_dir, ['patch-Modules-_sqlite-connection.c.diff'])
         if version == '2.7.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python27")
             self._add_patches_to_list(
                 patch_dir, ['patch-Modules-_sqlite-for-2.7.4.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python34(version):
         if version == '3.4.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python34")
             self._add_patches_to_list(patch_dir,
                                       ['patch-Modules-Setup.dist.diff'])
     self._do_patch()
예제 #6
0
    def patch(self):
        # note: want an interface to the source patching functionality. like a patchperl.
        version = Version(self.pkg.version)
        if is_python24(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON24
            self._add_patches_to_list(patch_dir, ['patch-configure', 'patch-Makefile.pre.in',
                                                  'patch-Lib-cgi.py.diff', 'patch-Lib-site.py.diff',
                                                  'patch-setup.py.diff', 'patch-Include-pyport.h',
                                                  'patch-Mac-OSX-Makefile.in', 'patch-Mac-OSX-IDLE-Makefile.in',
                                                  'patch-Mac-OSX-PythonLauncher-Makefile.in', 'patch-configure-badcflags.diff',
                                                  'patch-configure-arch_only.diff', 'patch-macosmodule.diff',
                                                  'patch-mactoolboxglue.diff', 'patch-pymactoolbox.diff',
                                                  'patch-gestaltmodule.c.diff'])
        elif is_python25(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON25
            self._add_patches_to_list(patch_dir, ['patch-Makefile.pre.in.diff',
                                                  'patch-Lib-cgi.py.diff',
                                                  'patch-Lib-distutils-dist.py.diff',
                                                  'patch-setup.py.diff',
                                                  'patch-configure-badcflags.diff',
                                                  'patch-configure-arch_only.diff',
                                                  'patch-configure-no-posix-c-source.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):
            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 impossible with 2.7.4, experimental fix until the official one is published    
            if version < '2.7.4':
                patch_dir = PATH_PATCHES_MACOSX_PYTHON27
                self._add_patches_to_list(patch_dir, ['patch-Modules-posixmodule.diff'])

        self._do_patch()
예제 #7
0
 def patch(self):
     version = Version(self.pkg.version)
     # for ubuntu 11.04(Natty)
     if is_python24(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python24")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python25(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python25")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python26(version):
         if version < '2.6.6':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python26")
             if version < '2.6.3':
                 self._add_patches_to_list(patch_dir, ['patch-Makefile.pre.in-for-2.6.2-and-earlier.diff'])
             self._add_patches_to_list(patch_dir, ['patch-setup.py-for-2.6.5-and-earlier.diff'])
             self._add_patches_to_list(patch_dir, ['patch-_ssl.c-for-ubuntu-oneiric-and-later.diff'])
         else:
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python27(version):
         if version < '2.7.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
         if version == '2.7.3':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python27")
             self._add_patches_to_list(patch_dir, ['patch-Modules-_sqlite-connection.c.diff'])
         if version == '2.7.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python27")
             self._add_patches_to_list(patch_dir, ['patch-Modules-_sqlite-for-2.7.4.diff'])
     elif is_python30(version):
         patch_dir = os.path.join(PATH_PATCHES_ALL, "python30")
         self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python31(version):
         if version < '3.1.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "common")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python32(version):
         if version == '3.2':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python32")
             self._add_patches_to_list(patch_dir, ['patch-setup.py.diff'])
     elif is_python34(version):
         if version == '3.4.4':
             patch_dir = os.path.join(PATH_PATCHES_ALL, "python34")
             self._add_patches_to_list(patch_dir, ['patch-Modules-Setup.dist.diff'])
     self._do_patch()
예제 #8
0
    def patch(self):
        # note: want an interface to the source patching functionality. like a patchperl.
        version = Version(self.pkg.version)
        if is_python24(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON24
            self._add_patches_to_list(
                patch_dir,
                [
                    "patch-configure",
                    "patch-Makefile.pre.in",
                    "patch-Lib-cgi.py.diff",
                    "patch-Lib-site.py.diff",
                    "patch-setup.py.diff",
                    "patch-Include-pyport.h",
                    "patch-Mac-OSX-Makefile.in",
                    "patch-Mac-OSX-IDLE-Makefile.in",
                    "patch-Mac-OSX-PythonLauncher-Makefile.in",
                    "patch-configure-badcflags.diff",
                    "patch-configure-arch_only.diff",
                    "patch-macosmodule.diff",
                    "patch-mactoolboxglue.diff",
                    "patch-pymactoolbox.diff",
                    "patch-gestaltmodule.c.diff",
                ],
            )
        elif is_python25(version):
            patch_dir = PATH_PATCHES_MACOSX_PYTHON25
            self._add_patches_to_list(
                patch_dir,
                [
                    "patch-Makefile.pre.in.diff",
                    "patch-Lib-cgi.py.diff",
                    "patch-Lib-distutils-dist.py.diff",
                    "patch-setup.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):
            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()