Make dump-things-service an optional dependency, named ttl #8
2 changed files with 15 additions and 6 deletions
|
|
@ -5,10 +5,17 @@ import json
|
|||
import re
|
||||
import sys
|
||||
|
||||
# The try-except clause is required because marking scripts as optional does
|
||||
# not work. That means, even scripts marked as optional are always installed
|
||||
# (see <https://stackoverflow.com/questions/77501716/pyproject-toml-setuptools-how-can-i-specify-optional-scripts-and-modules>)
|
||||
try:
|
||||
from dump_things_service.converter import (
|
||||
Format,
|
||||
FormatConverter,
|
||||
)
|
||||
except ImportError:
|
||||
print(f"Please install 'dump-things-pyclient[ttl]' to use this command.")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
description = f"""Read JSON records from stdin and convert them to TTL
|
||||
|
|
|
|||
|
|
@ -8,11 +8,13 @@ authors = [
|
|||
{name="Christian Mönch", email="christian.moench@web.de"},
|
||||
]
|
||||
dependencies = [
|
||||
"dump-things-service>=5.3.0",
|
||||
"requests>=2.32.5",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
[project.optional-dependencies]
|
||||
ttl = [
|
||||
"dump-things-service>=5.3.0",
|
||||
]
|
||||
tests = [
|
||||
"pytest>=9.0.1",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue