stylling and linting fixes to setup.py

This commit is contained in:
Venelin Stoykov 2017-05-17 18:12:57 +03:00
parent f96dadbfe0
commit 681b85d7bf

View file

@ -1,4 +1,4 @@
#/usr/bin/env python #!/usr/bin/env python
import codecs import codecs
import os import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
@ -7,7 +7,7 @@ import sys
# Workaround for multiprocessing/nose issue. See http://bugs.python.org/msg170215 # Workaround for multiprocessing/nose issue. See http://bugs.python.org/msg170215
try: try:
import multiprocessing import multiprocessing # NOQA
except ImportError: except ImportError:
pass pass
@ -19,13 +19,15 @@ if 'publish' in sys.argv:
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read() read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
def exec_file(filepath, globalz=None, localz=None): def exec_file(filepath, globalz=None, localz=None):
exec(read(filepath), globalz, localz) exec(read(filepath), globalz, localz)
# Load package meta from the pkgmeta module without loading imagekit. # Load package meta from the pkgmeta module without loading imagekit.
pkgmeta = {} pkgmeta = {}
exec_file(os.path.join(os.path.dirname(__file__), exec_file(os.path.join(os.path.dirname(__file__),
'imagekit', 'pkgmeta.py'), pkgmeta) 'imagekit', 'pkgmeta.py'), pkgmeta)
setup( setup(