python 2+3: consider C:\ and C:/ as absolute dirs (os.path.isabs)
This commit is contained in:
15
python2/2.7.6-allow-win-drives-in-os-path-isabs.patch
Normal file
15
python2/2.7.6-allow-win-drives-in-os-path-isabs.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/Lib/posixpath.py 2014-02-21 10:34:28.539709900 +0000
|
||||
+++ b/Lib/posixpath.py 2014-02-21 10:37:02.070491400 +0000
|
||||
@@ -58,7 +58,11 @@
|
||||
|
||||
def isabs(s):
|
||||
"""Test whether a path is absolute"""
|
||||
- return s.startswith('/')
|
||||
+ return s.startswith('/') or \
|
||||
+ (sys.platform == 'msys' and \
|
||||
+ len(s) > 2 and \
|
||||
+ s[1] == ':' and \
|
||||
+ (s[2] == os.sep or s[2] == '\\'))
|
||||
|
||||
|
||||
# Join pathnames.
|
||||
@@ -1,8 +1,9 @@
|
||||
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
|
||||
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
||||
|
||||
pkgname=python2
|
||||
pkgver=2.7.6
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
_pybasever=2.7
|
||||
pkgdesc="A high-level scripting language"
|
||||
arch=('i686' 'x86_64')
|
||||
@@ -28,7 +29,8 @@ source=(http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz
|
||||
2.7.5-dylib.patch
|
||||
2.7.5-dbm.patch
|
||||
2.7.5-ctypes-util-find_library.patch
|
||||
2.7.5-allow-windows-paths-for-executable.patch)
|
||||
2.7.5-allow-windows-paths-for-executable.patch
|
||||
2.7.6-allow-win-drives-in-os-path-isabs.patch)
|
||||
sha1sums=('8321636af2acbeaa68fc635d7dda7369ed446a80'
|
||||
'76474752d5b84ad78d53f418d554b5c706fcbca7'
|
||||
'2b5f115573d089801f023c16bacc08963f039272'
|
||||
@@ -44,7 +46,8 @@ sha1sums=('8321636af2acbeaa68fc635d7dda7369ed446a80'
|
||||
'eaf864af38e8b2bd3952ca9e7fbb6efb6191b792'
|
||||
'f6e392723ed2a4b7fe0138522baa0e0f7b8b3660'
|
||||
'efbee46e7f1485985409db0f25adbb18ecb4a4ae'
|
||||
'fb78069fadcf5394ba380e26e371ad687d344415')
|
||||
'fb78069fadcf5394ba380e26e371ad687d344415'
|
||||
'7e53560390aff658bbbb9384bef6b1871bffda14')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/Python-${pkgver}"
|
||||
@@ -66,7 +69,8 @@ prepare() {
|
||||
|
||||
# Incomplete patch from Ray Donnelly
|
||||
# patch -p1 -i ${srcdir}/2.7.5-allow-windows-paths-for-executable.patch
|
||||
|
||||
patch -p1 -i ${srcdir}/2.7.6-allow-win-drives-in-os-path-isabs.patch
|
||||
|
||||
# Temporary workaround for FS#22322
|
||||
# See http://bugs.python.org/issue10835 for upstream report
|
||||
sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
|
||||
|
||||
Reference in New Issue
Block a user