xonsh/setup.py

97 lines
5.3 KiB
Python
Raw Normal View History

2015-03-07 13:35:01 -06:00
#!/usr/bin/env python
2015-03-07 12:02:04 -06:00
"""The xonsh installer."""
2015-03-07 13:35:01 -06:00
from __future__ import print_function, unicode_literals
2015-03-07 12:02:04 -06:00
import os
import sys
try:
from setuptools import setup
HAVE_SETUPTOOLS = True
except ImportError:
from distutils.core import setup
HAVE_SETUPTOOLS = False
2015-03-09 01:03:47 -05:00
VERSION = '0.1.0'
2015-03-07 12:09:30 -06:00
2015-03-07 13:24:44 -06:00
TABLES = ['xonsh/lexer_table.py', 'xonsh/parser_table.py']
def clean_tables():
for f in TABLES:
if os.path.isfile(f):
os.remove(f)
print('Remove ' + f)
def build_tables():
print('Building lexer and parser tables.')
sys.path.insert(0, os.path.dirname(__file__))
from xonsh.parser import Parser
Parser(lexer_table='lexer_table', yacc_table='parser_table',
outputdir='xonsh')
sys.path.pop(0)
2015-03-07 12:02:04 -06:00
def main():
2015-03-07 17:32:13 -06:00
print(logo)
2015-03-07 13:24:44 -06:00
clean_tables()
build_tables()
2015-03-09 10:54:59 +01:00
with open('README.rst', 'r') as f:
2015-03-07 12:09:30 -06:00
readme = f.read()
skw = dict(
name='xonsh',
description='an exotic, usable shell',
long_description=readme,
license='BSD',
version=VERSION,
author='Anthony Scopatz',
maintainer='Anthony Scopatz',
author_email='scopatz@gmail.com',
url='https://github.com/scopatz/xonsh',
platforms='Cross Platform',
classifiers = ['Programming Language :: Python :: 3'],
packages=['xonsh'],
2015-03-07 12:11:43 -06:00
scripts=['scripts/xonsh'],
2015-03-07 12:09:30 -06:00
)
2015-03-07 12:02:04 -06:00
setup(**skw)
2015-03-07 17:32:13 -06:00
logo = """
4Φ
²^
- " ╒▄█████▀█
W
m%Φ *" ,α█████▓▄,▄▀Γ"
"▀██¼" `^` ,
,Mj '║ ╔ ╣║▌ ▀▄
m ^ "ÜM j▐╟╫╨▒ ╙▀≡═╤═m▀╗
æsæ , ,Ä '╕H LU ║║╠╫Å^2=⌐ █
æ%Ū $1 *T
%,M M"^ ╫
@ ` D¬ s
` *`
U $ M%
MM22,
^ MM¬ M
H MM"^^^^^"
@ H' ║▐▐▐█══=.,,, █
**** -
¼V
M UUMJ^^" ▐▌
$j Å%%%
^ .DU^["" -
` M ţ%""w
`` UW%* =z Γ
Å%ƒⁿ= -`
W £6,"ⁿ ` ▄≡▀▀▀
"█▌▌╟Å╓█╓█▀%` ▄▀
`UU%*
ÅŬ` `"
~%4^
"M█ `▀╕ X╕"^
M e^
^^
"""
2015-03-07 12:02:04 -06:00
if __name__ == '__main__':
main()
2015-03-07 17:32:13 -06:00