Skip to content

Commit

Permalink
Hardcode the version string in setup to avoid import issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anderycks committed Apr 6, 2017
1 parent f407216 commit 7f70a25
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__,
Expand Down

0 comments on commit 7f70a25

Please sign in to comment.