| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1fbd5d0 commit e3e08eb
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,15 @@ | |||
| 6 | 6 | import subprocess | |
| 7 | 7 | from pathlib import Path | |
| 8 | 8 | ||
| 9 | - import tomllib | ||
| 9 | + try: | ||
| 10 | + import tomllib | ||
| 11 | + except ImportError: | ||
| 12 | + try: | ||
| 13 | + import tomli as tomllib | ||
| 14 | + except ImportError as ie: | ||
| 15 | + raise ImportError( | ||
| 16 | + "tomli or tomllib is required to parse pyproject.toml" | ||
| 17 | + ) from ie | ||
| 10 | 18 | ||
| 11 | 19 | PROJECT_DIR = Path(__file__).resolve().parent | |
| 12 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,5 @@ | |||
| 1 | + # for babel_runner.py | ||
| 2 | + setuptools | ||
| 3 | + Babel | ||
| 4 | + Jinja2 | ||
| 5 | + tomli; python_version < "3.10" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments