Do imports at the head of the file

--HG--
branch : pytest-2.7
This commit is contained in:
Floris Bruynooghe 2015-04-12 23:36:28 +01:00
parent db08dcab14
commit 129bb5393b
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,6 @@
import os, sys import os, sys
import setuptools
import pkg_resources
from setuptools import setup, Command from setuptools import setup, Command
classifiers = ['Development Status :: 6 - Mature', classifiers = ['Development Status :: 6 - Mature',
@ -39,8 +41,6 @@ def has_environment_marker_support():
* https://www.python.org/dev/peps/pep-0426/#environment-markers * https://www.python.org/dev/peps/pep-0426/#environment-markers
""" """
try: try:
import setuptools
import pkg_resources
return pkg_resources.parse_version(setuptools.__version__) >= pkg_resources.parse_version('0.7.2') return pkg_resources.parse_version(setuptools.__version__) >= pkg_resources.parse_version('0.7.2')
except Exception as exc: except Exception as exc:
sys.stderr.write("Could not test setuptool's version: %s\n" % exc) sys.stderr.write("Could not test setuptool's version: %s\n" % exc)