summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-07-07 10:23:26 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-07-07 10:23:26 +1000
commit7ac8099b9650e9e7125473cbe5666f1c16640dae (patch)
treefb3c4df0a97c5ddabdd5db9cd23b7b260aefe35c
parentb79c44e5ffd5803d0d6be5115ec3bf96ce283fb6 (diff)
setup: Leave a useful message if Python version too low.
-rw-r--r--setup.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index cdf72ad..bf9d46a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,10 @@
"""wal - setup.py"""
import setuptools
-import pywal
+
+try:
+ import pywal
+except (ImportError, SyntaxError):
+ raise ImportError('pywal requires Python 3.6 or greater.')
DESC = (
@@ -10,7 +14,7 @@ DESC = (
)
VERSION = pywal.__version__
-DOWNLOAD_URL = f"https://github.com/dylanaraps/pywal/archive/{VERSION}.tar.gz"
+DOWNLOAD = "https://github.com/dylanaraps/pywal/archive/%s.tar.gz" % VERSION
setuptools.setup(
@@ -22,7 +26,7 @@ setuptools.setup(
long_description=DESC,
license="MIT",
url="https://github.com/dylanaraps/pywal",
- download_url=DOWNLOAD_URL,
+ download_url=DOWNLOAD,
classifiers=[
"Environment :: X11 Applications",
"License :: OSI Approved :: MIT License",