diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-10 19:05:15 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-01-04 21:29:02 +0200 |
commit | 0538009d30c02aba7f3b0e2fb22589c55fbe0fd0 (patch) | |
tree | 6c625610f9c9d6ac72aa6c83800b5964ccdf71a7 /mesonbuild/mesonlib.py | |
parent | 65f78a722ad0f8ab260e7cf24636ef38e8bd957f (diff) | |
download | meson-0538009d30c02aba7f3b0e2fb22589c55fbe0fd0.zip meson-0538009d30c02aba7f3b0e2fb22589c55fbe0fd0.tar.gz meson-0538009d30c02aba7f3b0e2fb22589c55fbe0fd0.tar.bz2 |
Bump minimum supported Python from 3.4 to 3.5.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 66bf98e..3b32996 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -702,31 +702,6 @@ def Popen_safe_legacy(args, write=None, stderr=subprocess.PIPE, **kwargs): e = e.decode(errors='replace').replace('\r\n', '\n') return p, o, e -def commonpath(paths): - ''' - For use on Python 3.4 where os.path.commonpath is not available. - We currently use it everywhere so this receives enough testing. - ''' - # XXX: Replace me with os.path.commonpath when we start requiring Python 3.5 - import pathlib - if not paths: - raise ValueError('arg is an empty sequence') - common = pathlib.PurePath(paths[0]) - for path in paths[1:]: - new = [] - path = pathlib.PurePath(path) - for c, p in zip(common.parts, path.parts): - if c != p: - break - new.append(c) - # Don't convert '' into '.' - if not new: - common = '' - break - new = os.path.join(*new) - common = pathlib.PurePath(new) - return str(common) - def iter_regexin_iter(regexiter, initer): ''' Takes each regular expression in @regexiter and tries to search for it in |