]> git.phdru.name Git - m_librarian.git/commitdiff
Build: Use module returned by imp.load_source() directly
authorOleg Broytman <phd@phdru.name>
Sun, 4 Feb 2018 06:22:30 +0000 (09:22 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 4 Feb 2018 06:22:30 +0000 (09:22 +0300)
setup.py

index bfbbe7aed13f80e1a06662c91d69fd073e36ff9c..0c4c5aeda8914f3f287f79ea58edc31b80c4d658 100755 (executable)
--- 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',