From 65d3c3228f943b607c5a084c52d990b9c66bfb71 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 9 Sep 2017 14:55:16 -0500
Subject: [PATCH] Check for compyte presence before running setup

---
 setup.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 42628385..4456ab34 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,6 @@ from __future__ import absolute_import, print_function
 __copyright__ = """
 Copyright (C) 2009-15 Andreas Kloeckner
 Copyright (C) 2013 Marko Bencun
-Copyright (C) 2013 Marko Bencun
 """
 
 __license__ = """
@@ -31,6 +30,7 @@ THE SOFTWARE.
 
 
 import sys
+from os.path import exists
 
 
 def get_config_schema():
@@ -169,6 +169,18 @@ def main():
         from aksetup_helper import count_down_delay
         count_down_delay(delay=5)
 
+    if not exists("pyopencl/compyte/dtypes.py"):
+        print(75 * "-")
+        print("You are missing important files from the pyopencl distribution.")
+        print(75 * "-")
+        print("You may have downloaded a zip or tar file from Github.")
+        print("Those do not work, and I am unable to prevent Github from showing")
+        print("them. Delete that file, and get an actual release file from the")
+        print("Python package index:")
+        print()
+        print("https://pypi.python.org/pypi/pyopencl")
+        sys.exit(1)
+
     # {{{ write cffi build script
 
     with open("cffi_build.py.in", "rt") as f:
-- 
GitLab