diff options
author | Kali Kaneko <kali@leap.se> | 2016-04-07 11:09:05 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-04-07 11:09:05 -0400 |
commit | 42e4458f3f37d50725a37a7e22835ab677cc24aa (patch) | |
tree | 3b4b69a948d7ca23f4031abcffea0d08dfc21b49 /setup.py | |
parent | dadfb03b90d099d50c7c225da297952cdfb7b9aa (diff) |
[style] pep8
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -20,37 +20,43 @@ Setup file for bitmask. """ from __future__ import print_function +import glob import hashlib -import sys import os +import platform import re +import shutil +import sys from distutils.command.build import build as _build from setuptools import Command +from setuptools.command.develop import develop as _develop -if not sys.version_info[0] == 2: - print("[ERROR] Sorry, Python 3 is not supported (yet). " - "Try running with python2: python2 setup.py ...") - exit() - -try: - from setuptools import setup, find_packages -except ImportError: - from pkg import distribute_setup - distribute_setup.use_setuptools() - from setuptools import setup, find_packages from pkg import utils import versioneer - # The following import avoids the premature unloading of the `util` submodule # when running tests, which would cause an error when nose finishes tests and # calls the exit function of the multiprocessing module. from multiprocessing import util assert(util) + +try: + from setuptools import setup, find_packages +except ImportError: + from pkg import distribute_setup + distribute_setup.use_setuptools() + from setuptools import setup, find_packages + +if not sys.version_info[0] == 2: + print("[ERROR] Sorry, Python 3 is not supported (yet). " + "Try running with python2: python2 setup.py ...") + exit() + + setup_root = os.path.dirname(__file__) sys.path.insert(0, os.path.join(setup_root, "src")) @@ -167,8 +173,6 @@ else: leap_launcher = 'bitmask=leap.bitmask.app:start_app' -from setuptools.command.develop import develop as _develop - def copy_reqs(path, withsrc=False): # add a copy of the processed requirements to the package @@ -365,10 +369,6 @@ class cmd_sdist(versioneer_sdist): pass -import shutil -import glob - - def _get_leap_versions(): versions = {} with open("pkg/leap_versions.txt") as vf: @@ -457,7 +457,6 @@ def copy_recursively(source_folder, destination_folder): cmdclass["build"] = cmd_build cmdclass["sdist"] = cmd_sdist -import platform _system = platform.system() IS_LINUX = _system == "Linux" IS_MAC = _system == "Darwin" |