Skip to content
Snippets Groups Projects
Commit be8f1a55 authored by David Douard's avatar David Douard
Browse files

Adapt cli declaration entrypoint to swh.core 0.3

The addition of '-p no:pytest_swh_core' in pytest.ini is needed to
prevent pytest from loading the pytest_swh_core plugin which we do not
need here and which would require some more dependencies (e.g.
requests).
parent e0b4b946
No related branches found
Tags v0.6.7
No related merge requests found
[pytest]
addopts = --doctest-modules
addopts = --doctest-modules -p no:pytest_swh_core
norecursedirs = docs .*
markers =
fs: tests that involve filesystem ios
swh.core
swh.core >= 0.3
Click
dulwich
......@@ -54,14 +54,14 @@ setup(
),
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",
......
......@@ -9,6 +9,8 @@ import sys
# 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 @@ def identify_object(obj_type, follow_symlinks, obj):
return (obj, swhid)
@click.command(context_settings=CONTEXT_SETTINGS)
@swh_cli_group.command(context_settings=CONTEXT_SETTINGS)
@click.option(
"--dereference/--no-dereference",
"follow_symlinks",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment