Пример #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):
         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()
Пример #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):
         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):
     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()
Пример #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()