diff --git a/setup.py b/setup.py index f1bd65e3d26f..cdc71129034c 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,19 @@ +# https://github.com/ninjaaron/fast-entry_points +# workaround for slow 'pkg_resources' import +# +# NOTE: this only has effect on console_scripts and no speed-up for commands +# under scripts/. Consider stop using scripts and use console_scripts instead +# +# https://stackoverflow.com/questions/18787036/difference-between-entry-points-console-scripts-and-scripts-in-setup-py +try: + import fastentrypoints +except ImportError: + from setuptools.command import easy_install + import pkg_resources + easy_install.main(['fastentrypoints']) + pkg_resources.require('fastentrypoints') + import fastentrypoints + import glob from setuptools import setup import unittest