Skip to content

Commit

Permalink
fix: update setup.py table generation function (xonsh#4044)
Browse files Browse the repository at this point in the history
* fix: update setup.py table generation function

so that will work with relative paths
- update extras-requirement full
- remove invalid link

fixes xonsh#4039

* Update setup.py
  • Loading branch information
jnoortheen authored Jan 5, 2021
1 parent 97cb072 commit d44a352
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 12 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# fixed. See https://github.com/xonsh/xonsh/issues/487.
import os
import sys
import json
import subprocess

from setuptools import setup, find_packages
Expand Down Expand Up @@ -62,14 +61,15 @@ def amalgamate_source():

def build_tables():
"""Build the lexer/parser modules."""
print("Building lexer and parser tables.")
sys.path.insert(0, os.path.dirname(__file__))
print("Building lexer and parser tables.", file=sys.stderr)
root_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, root_dir)
from xonsh.parser import Parser

Parser(
lexer_table="lexer_table",
yacc_table="parser_table",
outputdir="xonsh",
outputdir=os.path.join(root_dir, "xonsh"),
yacc_debug=True,
)
sys.path.pop(0)
Expand Down Expand Up @@ -348,7 +348,14 @@ def main():
"linux": ["distro"],
"proctitle": ["setproctitle"],
"zipapp": ['importlib_resources; python_version < "3.7"'],
"full": ["ptk", "pygments", "distro"],
"full": [
"prompt-toolkit>=3",
"pyperclip",
"pygments>=2.2",
"distro; platform_system=='Linux'", # PEP 508 platform specifiers
"setproctitle; platform_system=='Windows'",
"gnureadline; platform_system=='Darwin'",
],
}
skw["python_requires"] = ">=3.6"
setup(**skw)
Expand Down
1 change: 0 additions & 1 deletion xontribs.json

This file was deleted.

0 comments on commit d44a352

Please sign in to comment.