From a58da49d0142ae8329b3cb3cc0337744858ee122 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Sep 05 2017 13:49:25 +0000 Subject: typeshed fix. --- diff --git a/0001-Look-for-typeshed-in-usr-share.patch b/0001-Look-for-typeshed-in-usr-share.patch index ef409c0..e3b5c72 100644 --- a/0001-Look-for-typeshed-in-usr-share.patch +++ b/0001-Look-for-typeshed-in-usr-share.patch @@ -1,7 +1,7 @@ -From acb21f10d34135171035cdde696fa28c9b81336d Mon Sep 17 00:00:00 2001 +From 980a17c29d73a161e46f6b3c0faf1a8520427d12 Mon Sep 17 00:00:00 2001 From: David Shea Date: Tue, 15 Dec 2015 14:01:55 -0500 -Subject: [PATCH 1/2] Look for typeshed in /usr/share +Subject: [PATCH 1/3] Look for typeshed in /usr/share Skip installing the bundled typeshed --- @@ -10,10 +10,10 @@ Skip installing the bundled typeshed 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mypy/build.py b/mypy/build.py -index c4b9459..6195b7d 100644 +index 471f819f..8b050ae9 100644 --- a/mypy/build.py +++ b/mypy/build.py -@@ -225,7 +225,7 @@ def default_data_dir(bin_dir: Optional[str]) -> str: +@@ -245,7 +245,7 @@ def default_data_dir(bin_dir: Optional[str]) -> str: return dir elif base == 'bin': # Installed to somewhere (can be under /usr/local or anywhere). @@ -23,10 +23,10 @@ index c4b9459..6195b7d 100644 # Assume we installed python3 with brew on os x return os.path.join(os.path.dirname(dir), 'lib', 'mypy') diff --git a/setup.py b/setup.py -index 10da829..a35837c 100644 +index 77c3a3b8..fe7c7e5a 100644 --- a/setup.py +++ b/setup.py -@@ -53,8 +53,6 @@ def find_data_files(base, globs): +@@ -73,8 +73,6 @@ class CustomPythonBuild(build_py): data_files = [] @@ -36,5 +36,5 @@ index 10da829..a35837c 100644 classifiers = [ -- -2.9.2 +2.13.5 diff --git a/0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch b/0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch index d050d26..654785d 100644 --- a/0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch +++ b/0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch @@ -1,7 +1,7 @@ -From 90222ce2272cda680a71671e82177d752e2ae547 Mon Sep 17 00:00:00 2001 +From 8c93a55e9053f8c35a995514e063c7bab57aa354 Mon Sep 17 00:00:00 2001 From: David Shea Date: Thu, 7 Jan 2016 10:02:27 -0500 -Subject: [PATCH 2/2] Canonicalize bin_dir when looking for data_dir. +Subject: [PATCH 2/3] Canonicalize bin_dir when looking for data_dir. This way calling mypy as /bin/mypy will look for the data dir starting in /usr instead of /. @@ -10,10 +10,10 @@ in /usr instead of /. 1 file changed, 4 insertions(+) diff --git a/mypy/build.py b/mypy/build.py -index 6195b7d..0e139bb 100644 +index 8b050ae9..cc99dcf9 100644 --- a/mypy/build.py +++ b/mypy/build.py -@@ -214,6 +214,10 @@ def default_data_dir(bin_dir: Optional[str]) -> str: +@@ -234,6 +234,10 @@ def default_data_dir(bin_dir: Optional[str]) -> str: return subdir # Default to directory containing this file's parent. return parent @@ -25,5 +25,5 @@ index 6195b7d..0e139bb 100644 dir = os.path.dirname(bin_dir) if (sys.platform == 'win32' and base.lower() == 'scripts' -- -2.9.2 +2.13.5 diff --git a/python3-mypy.spec b/python3-mypy.spec index df0a0f8..637f8a6 100644 --- a/python3-mypy.spec +++ b/python3-mypy.spec @@ -23,6 +23,9 @@ Patch1: 0001-Look-for-typeshed-in-usr-share.patch # patch 1 breaks the data dir lookup when called as /bin/mypy instead of /usr/bin/mypy Patch2: 0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch +# passing the executable path down into main() got broken in upstream e491b5d4aa +Patch3: 0003-Pass-executable-path-into-main-when-running-installe.patch + BuildRequires: python3-devel # Needed to generate the man pages