From 8c864209256af5d88eee2eefc74c86c32b24d911 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 4 Feb 2018 09:23:46 +0300 Subject: [PATCH] Build: Use module returned by imp.load_source() directly --- project_template/setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/project_template/setup.py b/project_template/setup.py index f988f7c..9cde6ed 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -15,12 +15,10 @@ if is_setuptools: kw['python_requires'] = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*' versionpath = join(abspath(dirname(__file__)), '{project}', '__version__.py') -load_source('{project}_version', versionpath) -# Ignore: E402 module level import not at top of file -from {project}_version import __version__ # noqa +{project}_version = load_source('{project}_version', versionpath) setup(name='{project}', - version=__version__, + version={project}_version.__version__, description='Broytman {project}', long_description=open('README.rst', 'rU').read(), author='Oleg Broytman', -- 2.39.2