Skip to content

Commit 46d1968

Browse files
committed
Drop py-pandoc as a default dependency
We're finding that pre-commit-docx-plain can't reliably install py-pandoc from within a pre-commit environment (it can be pip-installed fine on its own). Thus we're reluctantly dropping py-pandoc and instead recommending that users install pandoc separately through apt-get or homebrew.
1 parent fb92574 commit 46d1968

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

CHANGELOG.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
Change log
22
==========
33

4-
Unreleased
5-
----------
4+
0.3.0 (2021-05-12)
5+
------------------
66

77
- Trim trailing whitespace from the output.
8+
- Drop ``py-pandoc`` as a default dependency.
9+
To get pandoc, you can install it with your system's package manager (such as homebrew or apt-get).
10+
Alternatively, you can directly install pre-commit-docx-plain using the ``[pandoc]`` extra to install pandoc through the ``py-pandoc`` PyPI package.
11+
However, we've found that py-pandoc cannot be installed reliably as a dependency of a pre-commit hook.
812

913
0.2.0 (2021-03-23)
1014
------------------

README.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ At the root of your document's Git repository, add a file named ``.pre-commit-co
1515

1616
repos:
1717
- repo: https://github.com/jsickcodes/pre-commit-docx-plain
18-
rev: 0.1.0
18+
rev: 0.3.0
1919
hooks:
2020
- id: docxplain
2121

@@ -65,6 +65,9 @@ If the repository does not already have a GitHub Actions workflow, create a file
6565
- name: Set up Python
6666
uses: actions/setup-python@v2
6767

68+
- name: Install pandoc
69+
run: brew install pandoc
70+
6871
- name: Run pre-commit hooks
6972
uses: pre-commit/action@v2.0.0
7073

@@ -92,6 +95,9 @@ The ``.github/workflows/ci.yaml`` file::
9295
- name: Set up Python
9396
uses: actions/setup-python@v2
9497

98+
- name: Install pandoc
99+
run: brew install pandoc
100+
95101
- name: Run pre-commit hooks
96102
uses: pre-commit/action@v2.0.0
97103
with:
@@ -115,7 +121,7 @@ However, you can customize the suffix of the file name by setting a ``--suffix``
115121

116122
repos:
117123
- repo: https://github.com/jsickcodes/pre-commit-docx-plain
118-
rev: 0.2.0
124+
rev: 0.3.0
119125
hooks:
120126
- id: docxplain
121127
args:
@@ -130,7 +136,7 @@ This is useful for explaining that the file is autogenerated::
130136

131137
repos:
132138
- repo: https://github.com/jsickcodes/pre-commit-docx-plain
133-
rev: 0.2.0
139+
rev: 0.3.0
134140
hooks:
135141
- id: docxplain
136142
args:
@@ -141,7 +147,7 @@ You can also insert the name of the source docx file using Python format string
141147

142148
repos:
143149
- repo: https://github.com/jsickcodes/pre-commit-docx-plain
144-
rev: 0.2.0
150+
rev: 0.3.0
145151
hooks:
146152
- id: docxplain
147153
args:

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[metadata]
22
name = docxplain
3+
version = 0.3.0
34
description = Convert Office (docx) files to plain text using pandoc.
45
author = Jonathan Sick
56
author_email = hi@jsick.codes
@@ -33,7 +34,6 @@ setup_requires =
3334
install_requires =
3435
importlib_metadata; python_version < "3.8"
3536
pypandoc
36-
py-pandoc
3737

3838
[options.packages.find]
3939
where = src
@@ -43,6 +43,8 @@ console_scripts =
4343
docxplain = docxplain.cli:main
4444

4545
[options.extras_require]
46+
pandoc =
47+
py-pandoc
4648
dev =
4749
pytest
4850

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ skip_missing_interpreters = True
1111
description = Run unit tests
1212
extras =
1313
dev
14+
pandoc
1415
commands=
1516
pytest {posargs}
1617

0 commit comments

Comments
 (0)