Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <nforro@redhat.com>
  • Loading branch information
nforro committed Mar 3, 2023
1 parent 40763b4 commit c75c0fe
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/user_guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Installation
:program:`rebase-helper` is packaged in Fedora, so you can just install it with :command:`dnf`.

If you can't or don't want to use :program:`rebase-helper` package, you have to install,
apart from Python requirements listed in `get_requirements` function in :file:`setup.py`,
the following dependencies:
apart from Python requirements listed in `install_requires` in the `options` section
in :file:`setup.cfg`, the following dependencies:

============ ======================== =================================================
Dependency Package name (in Fedora) Notes
Expand Down
52 changes: 40 additions & 12 deletions docs/user_guide/writing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Example
return cls.NAME
@classmethod
def run(cls, spec_file, rebase_spec_file):
def run(cls, spec_file, rebase_spec_file, **kwargs):
"""
This method is called after original SPEC file is processed
Expand All @@ -54,15 +54,43 @@ Example
from setuptools import setup
setup()
setup(
name='MySpecHook',
version='0.1',
description='Custom SPEC hook for rebase-helper',
author='John Doe',
install_requires=['rebasehelper>=0.10.0'],
packages=['my_spec_hook'],
entry_points={
'rebasehelper.spec_hooks': ['my_spec_hook = my_spec_hook:MySpecHook']
}
)
.. code-block:: ini
:caption: setup.cfg
[metadata]
name = MySpecHook
version = 0.1
description = Custom SPEC hook for rebase-helper
author = John Doe
[options]
packages = my_spec_hook
install_requires = rebasehelper>=0.10.0
[options.entry_points]
rebasehelper.spec_hooks =
my-spec-hook = my_spec_hook:MySpecHook
Alternatively, use `pyproject.toml` instead of `setup.py` and `setup.cfg`:

.. code-block:: toml
:caption: pyproject.toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "MySpecHook"
version = "0.1"
description = "Custom SPEC hook for rebase-helper"
authors = [{name = "John Doe"}]
dependencies = ["rebasehelper>=0.10.0"]
[project.entry-points."rebasehelper.spec_hooks"]
my-spec-hook = "my_spec_hook:MySpecHook"
[tool.setuptools]
packages = ["my_spec_hook"]

0 comments on commit c75c0fe

Please sign in to comment.