Skip to content

Commit fdf34a1

Browse files
authored
Merge pull request #282 from flying-sheep/patch-1
Always use setuptools if availabe
2 parents 086832c + f9bd264 commit fdf34a1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
],
7171
)
7272

73+
# require setuptools for these cases
7374
if 'develop' in sys.argv or any(a.startswith('bdist') for a in sys.argv):
7475
import setuptools
7576

@@ -85,7 +86,12 @@
8586
'test': ['ipykernel', 'ipython', 'mock', 'pytest'],
8687
}
8788

88-
if 'setuptools' in sys.modules:
89+
# always try to use setuptools if available
90+
try:
91+
import setuptools
92+
except ImportError:
93+
pass
94+
else:
8995
setup_args.update(setuptools_args)
9096
setup_args['entry_points'] = {
9197
'console_scripts': [

0 commit comments

Comments
 (0)