Skip to content

Commit 9bb5ef5

Browse files
committed
Fix imports and provide PRONOM entry point
1 parent b064c3e commit 9bb5ef5

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = {file = ["requirements/requirements.txt"]}
4040
jsonid = "jsonid.jsonid:main"
4141
momoa = "jsonid.jsonid:main"
4242
json2json = "utils.json2json:main"
43+
json2pronom = "utils.jsonid2pronom:main"
4344

4445
[build-system]
4546
requires = ["setuptools>=80.9.0", "wheel>=0.45.1", "setuptools_scm[toml]>=9.2.2"]

src/utils/jsonid2pronom.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
import logging
1010
import sys
1111

12-
from src.jsonid import pronom
12+
try:
13+
from src.jsonid import pronom
14+
except ModuleNotFoundError:
15+
try:
16+
from jsonid import pronom
17+
except ModuleNotFoundError:
18+
import pronom
1319

1420
# Set up logging.
1521
logging.basicConfig(

0 commit comments

Comments
 (0)