From: Oleg Broytman Date: Sun, 4 Feb 2018 06:22:58 +0000 (+0300) Subject: Build: Use module returned by imp.load_source() directly X-Git-Tag: 0.2.3~24 X-Git-Url: https://git.phdru.name/?p=sqlconvert.git;a=commitdiff_plain;h=7f3453568a45cafbd7950162cf4a3ad97ddc40da Build: Use module returned by imp.load_source() directly --- diff --git a/setup.py b/setup.py index 2313958..a310a2c 100755 --- a/setup.py +++ b/setup.py @@ -11,9 +11,7 @@ except ImportError: is_setuptools = False versionpath = join(abspath(dirname(__file__)), 'sqlconvert', '__version__.py') -load_source('sqlconvert_version', versionpath) -# Ignore: E402 module level import not at top of file -from sqlconvert_version import __version__ # noqa +sqlconvert_version = load_source('sqlconvert_version', versionpath) kw = {} if is_setuptools: @@ -28,7 +26,7 @@ if is_setuptools: kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' setup(name='sqlconvert', - version=__version__, + version=sqlconvert_version.__version__, description='Broytman sqlconvert', long_description=open('README.rst', 'rU').read(), author='Oleg Broytman',