From 7f70a253e5d59f3e515524764ae078edc7a7eb88 Mon Sep 17 00:00:00 2001 From: Deryck Hodge Date: Thu, 6 Apr 2017 12:23:14 -0500 Subject: [PATCH] Hardcode the version string in setup to avoid import issues. --- setup.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index b4e00a6..1d07b9c 100644 --- a/setup.py +++ b/setup.py @@ -18,9 +18,15 @@ requirements = ['SQLAlchemy', 'inflection'] if sys.version_info[0] != 3 or sys.version_info[1] < 4: - requirements.append('enum34') - -from sqlalchemy_jsonapi import __version__ + requirements.append('enum34') + +# XXX: deryck (2016 April 6) __version__ is defined twice. +# __version__ is defined here and in sqlalchemy_jsonapi.__version__ +# but we can't import it since __init__ imports literally everything. +# The constants and serializer files depend on enum34 which has to be +# conditionally installed. Once we stop supporting Python 2.7, +# this version string can also be imported as sqlalchemy_jsonapi.__version__. +__version__ = '4.0.9' setup(name='SQLAlchemy-JSONAPI', version=__version__,