Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions jaraco/text/show-newlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

from typing import TYPE_CHECKING

import autocommand
import inflect
from more_itertools import always_iterable

import jaraco.text

if TYPE_CHECKING:
Expand Down Expand Up @@ -37,4 +33,11 @@ def report_newlines(filename: FileDescriptorOrPath) -> None:
)


autocommand.autocommand(__name__)(report_newlines)
try:
import autocommand
import inflect
from more_itertools import always_iterable

autocommand.autocommand(__name__)(report_newlines)
except ModuleNotFoundError as error: # pragma: nocover
print(f"{error}. Did you forget to install it or 'jaraco.text[scripts]' ?")
9 changes: 6 additions & 3 deletions jaraco/text/strip-prefix.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys

import autocommand

from jaraco.text import Stripper


Expand All @@ -18,4 +16,9 @@ def strip_prefix() -> None:
sys.stdout.writelines(Stripper.strip_prefix(sys.stdin).lines)


autocommand.autocommand(__name__)(strip_prefix)
try:
import autocommand

autocommand.autocommand(__name__)(strip_prefix)
except ModuleNotFoundError as error: # pragma: nocover
print(f"{error}. Did you forget to install it or `jaraco.text[autocommand]` ?")
1 change: 1 addition & 0 deletions newsfragments/24.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Due to concerns with ``autocommand`` being licensed under LGPLv3, the scripts-only dependencies have been made optional and installable with the ``[scripts]`` extra -- by :user:`Avasam`
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ license = "MIT"
dependencies = [
"jaraco.functools",
"jaraco.context >= 4.1",
"autocommand",
"more_itertools",
]
dynamic = ["version"]

Expand Down Expand Up @@ -55,7 +53,11 @@ doc = [

# local
]
inflect = ["inflect"]
scripts = [
"autocommand",
"inflect",
"more_itertools",
]

check = [
"pytest-checkdocs >= 2.4",
Expand All @@ -78,6 +80,7 @@ type = [
"mypy < 1.19; python_implementation == 'PyPy'",

# local
"jaraco.text[scripts]"
]


Expand Down