mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
added xon.sh
This commit is contained in:
parent
bb0998e2cb
commit
20b64aa665
2 changed files with 19 additions and 5 deletions
2
scripts/xon.sh
Executable file
2
scripts/xon.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
/usr/bin/env PYTHONUNBUFFERED=1 python3 -u -m xonsh $@
|
22
setup.py
22
setup.py
|
@ -163,6 +163,11 @@ def main():
|
||||||
pass
|
pass
|
||||||
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'r') as f:
|
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'r') as f:
|
||||||
readme = f.read()
|
readme = f.read()
|
||||||
|
scripts = ['scripts/xon.sh']
|
||||||
|
if 'win' in sys.platform:
|
||||||
|
scripts.append('scripts/xonsh.bat')
|
||||||
|
else:
|
||||||
|
scripts.append('scripts/xonsh')
|
||||||
skw = dict(
|
skw = dict(
|
||||||
name='xonsh',
|
name='xonsh',
|
||||||
description='A general purpose, Python-ish shell',
|
description='A general purpose, Python-ish shell',
|
||||||
|
@ -179,18 +184,25 @@ def main():
|
||||||
'xonsh.xoreutils', 'xontrib', 'xonsh.completers'],
|
'xonsh.xoreutils', 'xontrib', 'xonsh.completers'],
|
||||||
package_dir={'xonsh': 'xonsh', 'xontrib': 'xontrib'},
|
package_dir={'xonsh': 'xonsh', 'xontrib': 'xontrib'},
|
||||||
package_data={'xonsh': ['*.json'], 'xontrib': ['*.xsh']},
|
package_data={'xonsh': ['*.json'], 'xontrib': ['*.xsh']},
|
||||||
cmdclass=cmdclass
|
cmdclass=cmdclass,
|
||||||
|
scripts=scripts,
|
||||||
)
|
)
|
||||||
if HAVE_SETUPTOOLS:
|
if HAVE_SETUPTOOLS:
|
||||||
|
# WARNING!!! Do not use setuptools 'console_scripts'
|
||||||
|
# It validates the depenendcies (of which we have none) everytime the
|
||||||
|
# 'xonsh' command is run. This validation adds ~0.2 sec. to the startup
|
||||||
|
# time of xonsh - for every single xonsh run. This prevents us from
|
||||||
|
# reaching the goal of a startup time of < 0.1 sec. So never ever write
|
||||||
|
# the following:
|
||||||
|
#
|
||||||
|
# 'console_scripts': ['xonsh = xonsh.main:main'],
|
||||||
|
#
|
||||||
|
# END WARNING
|
||||||
skw['entry_points'] = {
|
skw['entry_points'] = {
|
||||||
'pygments.lexers': ['xonsh = xonsh.pyghooks:XonshLexer',
|
'pygments.lexers': ['xonsh = xonsh.pyghooks:XonshLexer',
|
||||||
'xonshcon = xonsh.pyghooks:XonshConsoleLexer'],
|
'xonshcon = xonsh.pyghooks:XonshConsoleLexer'],
|
||||||
'console_scripts': ['xonsh = xonsh.main:main'],
|
|
||||||
}
|
}
|
||||||
skw['cmdclass']['develop'] = xdevelop
|
skw['cmdclass']['develop'] = xdevelop
|
||||||
else:
|
|
||||||
skw['scripts'] = ['scripts/xonsh'] if 'win' not in sys.platform else ['scripts/xonsh.bat']
|
|
||||||
|
|
||||||
setup(**skw)
|
setup(**skw)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue