Skip to content

Commit

Permalink
Fix #161: Correctly check Python version requirements in setup.py.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 347058128
Change-Id: I69c1933a07531c8730b57702cccd23efc24a29f5
  • Loading branch information
yilei authored and Copybara-Service committed Dec 11, 2020
1 parent de0fad7 commit d61b0b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from __future__ import print_function

import os
import platform
import sys

try:
Expand All @@ -29,8 +28,8 @@
use_setuptools()
import setuptools

py_version = platform.python_version_tuple()
if py_version < ('2', '7') or py_version[0] == '3' and py_version < ('3', '4'):
py_version = sys.version_info
if py_version < (2, 7) or py_version[0] == 3 and py_version < (3, 4):
raise RuntimeError('Python version 2.7 or 3.4+ is required.')

INSTALL_REQUIRES = [
Expand Down

0 comments on commit d61b0b6

Please sign in to comment.