Skip to content

Commit f9bd264

Browse files
authored
Always use setuptools if availabe
When running `python* setup.py install`, the `jupyter-run` script doesn’t get installed without this.
1 parent 086832c commit f9bd264

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)