Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123330
D4051.id14282.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D4051.id14282.diff
View Options
diff --git a/pytest.ini b/pytest.ini
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,5 +1,5 @@
[pytest]
-addopts = --doctest-modules
+addopts = --doctest-modules -p no:pytest_swh_core
norecursedirs = docs .*
markers =
fs: tests that involve filesystem ios
diff --git a/requirements-cli.txt b/requirements-cli.txt
--- a/requirements-cli.txt
+++ b/requirements-cli.txt
@@ -1,3 +1,3 @@
-swh.core
+swh.core >= 0.3
Click
dulwich
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -54,14 +54,14 @@
),
extras_require={
"cli": parse_requirements("cli"),
- "testing": parse_requirements("test"),
+ "testing": parse_requirements("test") + parse_requirements("cli"),
},
include_package_data=True,
entry_points="""
[console_scripts]
swh-identify=swh.model.cli:identify
[swh.cli.subcommands]
- identify=swh.model.cli:identify
+ identify=swh.model.cli
""",
classifiers=[
"Programming Language :: Python :: 3",
diff --git a/swh/model/cli.py b/swh/model/cli.py
--- a/swh/model/cli.py
+++ b/swh/model/cli.py
@@ -9,6 +9,8 @@
# WARNING: do not import unnecessary things here to keep cli startup time under
# control
import click
+from swh.core.cli import swh as swh_cli_group
+
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
@@ -138,7 +140,7 @@
return (obj, swhid)
-@click.command(context_settings=CONTEXT_SETTINGS)
+@swh_cli_group.command(context_settings=CONTEXT_SETTINGS)
@click.option(
"--dereference/--no-dereference",
"follow_symlinks",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 8:43 PM (2 m, 24 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220053
Attached To
D4051: Adapt cli declaration entrypoint to swh.core 0.3
Event Timeline
Log In to Comment