1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

add python version testing in setup.py

This commit is contained in:
SanketDG 2015-07-01 07:37:41 +05:30
parent cb33c912e5
commit 409d839e92

13
setup.py Normal file → Executable file
View File

@ -1,5 +1,18 @@
#!/usr/bin/env python
import sys
from setuptools import setup, find_packages
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
print(
'thefuck requires Python version 2.7 or later' +
' ({}.{} detected).'.format(*sys.version_info[:2]))
sys.exit(-1)
if sys.version_info[0] == 3 and sys.version_info[1] < 3:
print(
'thefuck requires Python version 3.3 or later' +
' ({}.{} detected).'.format(*sys.version_info[:2]))
sys.exit(-1)
VERSION = '1.46'