mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Merge branch 'amalfix'
This commit is contained in:
commit
70d52ce457
2 changed files with 25 additions and 2 deletions
14
news/amalfix.rst
Normal file
14
news/amalfix.rst
Normal file
|
@ -0,0 +1,14 @@
|
|||
**Added:** None
|
||||
|
||||
**Changed:** None
|
||||
|
||||
**Deprecated:** None
|
||||
|
||||
**Removed:** None
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* ``setup.py`` will only amalgamate source files if ``amalgamate.py`` is
|
||||
available. This fixes issues with installing from pip.
|
||||
|
||||
**Security:** None
|
13
setup.py
13
setup.py
|
@ -48,6 +48,16 @@ def clean_tables():
|
|||
os.environ['XONSH_DEBUG'] = '1'
|
||||
from xonsh import __version__ as XONSH_VERSION
|
||||
|
||||
def amalagamate_source():
|
||||
"""Amalgamtes source files."""
|
||||
try:
|
||||
import amalgamate
|
||||
except ImportError:
|
||||
print('Could not import amalgamate, skipping.', file=sys.stderr)
|
||||
return
|
||||
amalgamate.main(['amalgamate', '--debug=XONSH_DEBUG', 'xonsh'])
|
||||
|
||||
|
||||
def build_tables():
|
||||
"""Build the lexer/parser modules."""
|
||||
print('Building lexer and parser tables.')
|
||||
|
@ -55,8 +65,7 @@ def build_tables():
|
|||
from xonsh.parser import Parser
|
||||
Parser(lexer_table='lexer_table', yacc_table='parser_table',
|
||||
outputdir='xonsh')
|
||||
import amalgamate
|
||||
amalgamate.main(['amalgamate', '--debug=XONSH_DEBUG', 'xonsh'])
|
||||
amalagamate_source()
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue