1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Gracefully handle pypi pysol_cards dependency

See:
https://sourceforge.net/p/pysolfc/discussion/503708/thread/208461caee/

Thanks to Fred.
This commit is contained in:
Shlomi Fish 2020-08-27 12:04:42 +03:00
parent e2c11a7ba0
commit b24da7cc92

View file

@ -25,7 +25,15 @@
# imports
import re
import pysol_cards
try:
import pysol_cards
except ImportError:
import sys
sys.stderr.write(
"Please install pysol_cards.py from \"PyPI\"\r\n" +
"(e.g: using \"python3 -m pip install " +
"--user --upgrade pysol_cards\"\r\n")
sys.exit(1)
assert getattr(pysol_cards, 'VERSION', (0, 0, 0)) >= (0, 8, 17), (
"Newer version of https://pypi.org/project/pysol-cards is required.")
import pysol_cards.random # noqa: E402,I100