Skip to content

Commit

Permalink
Update documentation to transition from setuptools to hatchling
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarlow83 committed Aug 31, 2024
1 parent b9dd0a5 commit 8d7a8f0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
5 changes: 2 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ OCRmyPDF is includes in MacPorts:
sudo port install ocrmypdf
Note that while this will install tesseract you will need to install
the appropriate tesseract `language ports <https://ports.macports.org/search/?selected_facets=categories_exact%3Atextproc&installed_file=&q=tesseract&name=on>`__.
the appropriate tesseract `language ports <https://ports.macports.org/search/?selected_facets=categories_exact%3Atextproc&installed_file=&q=tesseract&name=on>`__.

Manual installation on macOS
----------------------------
Expand Down Expand Up @@ -640,8 +640,7 @@ environment:
pip install git+https://github.com/ocrmypdf/OCRmyPDF.git
Or, to install in `development
mode <https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#working-in-development-mode>`__,
Or, to install in editable mode
allowing customization of OCRmyPDF, use the ``-e`` flag:

.. code-block:: bash
Expand Down
5 changes: 3 additions & 2 deletions docs/maintainers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ on ARM and x86_64. Performance may be poor on other processor architectures.
Versioning scheme
-----------------

OCRmyPDF uses setuptools-scm for versioning, which derives the version from
OCRmyPDF uses hatch-vcs for versioning, which derives the version from
Git as a single source of truth. This may be unsuitable for some distributions, e.g.
to indicate that your distribution modifies OCRmyPDF in some way.

You can patch the ``__version__`` variable in ``src/ocrmypdf/_version.py`` if
necessary.
necessary, or set the environment variable ``SETUPTOOLS_SCM_PRETEND_VERSION``
to the required version, if you need to override versioning for some reason.

jbig2enc
--------
Expand Down
21 changes: 9 additions & 12 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ conventions. Note that: plugins installed with as setuptools entrypoints are
not checked currently, because OCRmyPDF assumes you may not want to enable
plugins for all files.

See [OCRmyPDF-EasyOCR](https://github.com/ocrmypdf/OCRmyPDF-EasyOCR) for an
example of a straightforward, fully working plugin.

Script plugins
==============

Expand Down Expand Up @@ -70,14 +73,15 @@ similar to ``pytest`` packages such as ``pytest-cov`` (the package) and
module), just like pytest plugins. At the same time, please make it clear
that your package is not official.

Setuptools plugins
==================
Plugins
=======

You can also create a plugin that OCRmyPDF will always automatically load if both are
installed in the same virtual environment, using a setuptools entrypoint.
installed in the same virtual environment, using a project entrypoint.
OCRmyPDF uses the entrypoint namespace "ocrmypdf".

Your package's ``pyproject.toml`` would need to contain the following, for a plugin
named ``ocrmypdf-exampleplugin``:
For example, ``pyproject.toml`` would need to contain the following, for a plugin named
``ocrmypdf-exampleplugin``:

.. code-block:: toml
Expand All @@ -87,13 +91,6 @@ named ``ocrmypdf-exampleplugin``:
[project.entry-points."ocrmypdf"]
exampleplugin = "exampleplugin.pluginmodule"
.. code-block:: ini
# equivalent setup.cfg
[options.entry_points]
ocrmypdf =
exampleplugin = exampleplugin.pluginmodule
Plugin requirements
===================

Expand Down
10 changes: 10 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ OCRmyPDF typically supports the three most recent Python versions.

.. |OCRmyPDF PyPI| image:: https://img.shields.io/pypi/v/ocrmypdf.svg

v16.5.0
=======

- Presumably fixed issue with interpreting PDFs that have images with array masks.
:issue:`1377`
- Enabled testing on Python 3.13.
- Fixed a test that did not work correctly but still passed. :issue:`1382`
- Improved "PDF/A conversion failed" warning message to better describe implications.
- Updated documentation to better explain OCR_JSON_SETTINGS in batch processing.

v16.4.3
=======

Expand Down

0 comments on commit 8d7a8f0

Please sign in to comment.