[mousetrap/gnome3-wip: 164/240] Don't display xlib warning for Py3
- From: Heidi Ellis <heidiellis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetrap/gnome3-wip: 164/240] Don't display xlib warning for Py3
- Date: Mon, 8 Sep 2014 15:26:21 +0000 (UTC)
commit 851c604eac093a61f48cab9394810876fad6c2ab
Author: Kevin Brown <kevin kevinbrown in>
Date: Wed Jun 25 18:45:15 2014 -0400
Don't display xlib warning for Py3
setup.py | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/setup.py b/setup.py
index 8f35585..f1c824d 100644
--- a/setup.py
+++ b/setup.py
@@ -57,21 +57,23 @@ The installation not work as expected without this dependency.
try:
import Xlib
except ImportError:
- sys.stderr.write(
-"""
-Python Xlib does not appear to be installed. This cannot be installed
-automatically and must be installed to the system using your package manager.
+ # Python3-xlib can be installed automatically
+ if PYTHON_VERSION[0] < 3:
+ sys.stderr.write(
+ """
+ Python Xlib does not appear to be installed. This cannot be installed
+ automatically and must be installed to the system using your package manager.
-On apt-based systems:
+ On apt-based systems:
- sudo apt-get install python-xlib
+ sudo apt-get install python-xlib
-On yum-based systems:
+ On yum-based systems:
- sudo yum install python-xlib
+ sudo yum install python-xlib
-The installation not work as expected without this dependency.
-""")
+ The installation not work as expected without this dependency.
+ """)
try:
import cv2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]