Skip to content

Commit

Permalink
Add a urwid package check so I can publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
iiPythonx committed Feb 3, 2024
1 parent 814d525 commit 4e29f02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions nightwatch/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
# Initialization
def main() -> None:

# Check urwid
def invalid_urwid_distrib():
exit("ERROR: Nightwatch requires urwid to have a specific unicode patch not currently included in upstream urwid.\n\n" \
"To fix this, run:\npip install -U urwid@git+https://github.com/iiPythonx/urwid\n\n" \
"and relaunch Nightwatch.")

try:
from urwid import is_iipython_urwid
if not is_iipython_urwid:
invalid_urwid_distrib()

except ImportError:
invalid_urwid_distrib()

# Modules
from argparse import ArgumentParser
from nightwatch.client import start_client
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
dependencies = [
"websockets",
"orjson",
"urwid@git+https://github.com/iiPythonx/urwid",
"urwid", # NEEDED: urwid@git+https://github.com/iiPythonx/urwid
"nanoid"
]

Expand Down

0 comments on commit 4e29f02

Please sign in to comment.