Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit a054869

Browse files
James CrosbyJames Crosby
James Crosby
authored and
James Crosby
committed
use scripts instead of entry points only on non-windows platforms
1 parent 17b9889 commit a054869

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

setup.py

+14-9
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@ def read(fname):
1313
# we need 'ntfsutils' in Windows
1414
if os.name == 'nt':
1515
platform_deps = ['ntfsutils>=0.1.3,<0.2']
16+
entry_points={
17+
"console_scripts": [
18+
"yotta=yotta:main",
19+
"yt=yotta:main",
20+
],
21+
}
22+
scripts = []
1623
else:
1724
platform_deps = []
25+
# entry points are nice, but add ~100ms to startup time with all the
26+
# pkg_resources infrastructure, so we use scripts= instead on unix-y
27+
# platforms:
28+
scripts = ['bin/yotta', 'bin/yt']
29+
entry_points = {}
1830

1931
setup(
2032
name = "yotta",
@@ -36,15 +48,8 @@ def read(fname):
3648
"License :: OSI Approved :: Apache Software License",
3749
"Environment :: Console",
3850
],
39-
# entry points are nice, but add ~100ms to startup time with all the
40-
# pkg_resources infrastructure, so we use scripts= instead :(
41-
#entry_points={
42-
# "console_scripts": [
43-
# "yotta=yotta:main",
44-
# "yt=yotta:main",
45-
# ],
46-
#},
47-
scripts=['bin/yt', 'bin/yotta'],
51+
entry_points=entry_points,
52+
scripts=scripts,
4853
test_suite = 'yotta.test',
4954
install_requires=[
5055
'semantic_version>=2.3.1,<3',

0 commit comments

Comments
 (0)