alunduil 15/06/07 19:26:29 Added: use-which.patch Log: add patch for mypy script to fix #551272 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 11A8217C!)
Revision Changes Path 1.1 dev-python/mypy/files/use-which.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mypy/files/use-which.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mypy/files/use-which.patch?rev=1.1&content-type=text/plain Index: use-which.patch =================================================================== diff --git a/scripts/mypy b/scripts/mypy index e758f1f..5a06146 100755 --- a/scripts/mypy +++ b/scripts/mypy @@ -45,14 +45,7 @@ def find_bin_directory() -> str: This is used by build to find stubs and other data files. """ - script = __file__ - # Follow up to 5 symbolic links (cap to avoid cycles). - for i in range(5): - if os.path.islink(script): - script = readlinkabs(script) - else: - break - return os.path.dirname(script) + return os.path.dirname(shutil.which('mypy')) def readlinkabs(link: str) -> str:
