From df203f56e0035351f68c7d01f4842330b53b26e1 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 4 Feb 2018 09:22:30 +0300 Subject: [PATCH] Build: Use module returned by imp.load_source() directly --- setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index bfbbe7a..0c4c5ae 100755 --- a/setup.py +++ b/setup.py @@ -15,12 +15,10 @@ if is_setuptools: kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' versionpath = join(abspath(dirname(__file__)), 'm_librarian', '__version__.py') -load_source('m_librarian_version', versionpath) -# Ignore: E402 module level import not at top of file -from m_librarian_version import __version__ # noqa +m_librarian_version = load_source('m_librarian_version', versionpath) setup(name='m_librarian', - version=__version__, + version=m_librarian_version.__version__, description='m_Librarian for LibRusEc/Flibusta libraries', long_description=open('README.txt', 'rtU').read(), author='Oleg Broytman', -- 2.39.5