Skip to content

Commit 6f2c6d5

Browse files
committed
Added notifications
Users running non-Windows and Python other than 64-bit will receive a warning and stop the installation.
1 parent 0cc6f0d commit 6f2c6d5

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

setup.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
import os
22
import sys
3-
import util
3+
import platform
44

55
from setuptools import setup, find_packages
66

7+
import util
8+
9+
if os.name != "nt":
10+
print("""
11+
\nThe binaries distributed with this version are Windows only,
12+
- If you are on linux, look at
13+
github.com/pyqt/python-qt5/wiki/Compiling-PyQt5-on-Ubuntu-12.04.
14+
- If you are on OS X, look at the OSX specific port:
15+
github.com/pyqt/python-qt5-mavericks
16+
""")
17+
18+
sys.exit()
19+
20+
if "64bit" not in platform.architecture():
21+
print("""
22+
\nThe binaries distributed wtih this version are for the
23+
64-bit version of Python only.
24+
""")
25+
26+
sys.exit()
727

828
def get_version():
929
repo_dir = os.path.dirname(__file__)
@@ -73,4 +93,4 @@ def get_readme():
7393
classifiers=classifiers,
7494
package_data=get_package_data(),
7595
data_files=get_data_files()
76-
)
96+
)

0 commit comments

Comments
 (0)