Skip to content

Commit

Permalink
pyproject: remove unneeded data-files and add a PACKAGING.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Mar 13, 2024
1 parent 53347c0 commit a577a14
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions PACKAGING.md
@@ -0,0 +1,55 @@
Guidelines for Packaging
========================

These are some loose notes about packing Papis meant to highlight the different
components that are available and not to require a particular format.

Dependencies
============

See `pyproject.toml` for a complete list of dependencies and minimum versions.

Wheels
======

Papis uses the standard `pyproject.toml`-based format using `setuptools` as a
build backend. Wheels can be generated using
```
python -m build --wheel --skip-dependency-check .
```

A source distribution (*sdist*) can be build together with the wheel using just
```
python -m build --skip-dependency-check .
```

Man pages
=========

Papis documentation uses Sphinx, which can also generate man pages. By default,
we create man pages for all the standard Papis commands and some general
documentation for the configuration file. These can be generated using
```
make -C doc man
```

The resulting man pages can then be found in `doc/build/man` and should be installed
in appropriate locations.

Shell completions
=================

Papis uses `click` for its command-line parsing. To generate completions, use
```
_PAPIS_COMPLETE=bash_source papis
_PAPIS_COMPLETE=fish_source papis
_PAPIS_COMPLETE=zsh_source papis
```

Note that the generated completion files are not static and can pick up any
custom Papis commands and plugins even after installation.

Desktop file
============

There is a desktop file in `contrib/papis.desktop`.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -235,11 +235,11 @@ papis = ["py.typed"]
[tool.setuptools.data-files]
"share/applications" = ["contrib/papis.desktop"]
"share/bash-completion/completions" = ["scripts/shell_completion/click/bash/papis.bash"]
"share/doc/papis" = ["README.rst", "CHANGELOG.md", "AUTHORS", "LICENSE"]
"share/fish/vendor_completions.d" = ["scripts/shell_completion/click/fish/papis.fish"]
"share/man/man1" = ["doc/build/man/*"]
"share/zsh/site-functions" = ["scripts/shell_completion/click/zsh/_papis"]


[tool.pytest.ini_options]
addopts = [
"--doctest-modules",
Expand Down

0 comments on commit a577a14

Please sign in to comment.