You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checkout a working example here: [repo debian package](https://github.com/click-contrib/click-man/tree/master/examples/debian_pkg)
77
+
78
+
### Other distro packages
49
79
50
-
#### (1) Man pages are a UNIX thing
80
+
To include man pages in packages for other package managers like `dnf`, `zypper`, or `pacman`, you will likely need to do one of the following:
81
+
82
+
* For upstream maintainers: generate man pages as part of a build release process and include them in version control or your generated sdists
83
+
* For packagers: generate man pages as part of the package build process and include these in the RPMs or tarballs, along with the relevant stanzas in the package definition
84
+
85
+
If you are packaging utilities, we would welcome PRs documenting best practices for those using **click-man** to document their utilities.
86
+
87
+
## Issues with automatic man page installation
88
+
89
+
### Man pages are a UNIX thing
51
90
52
91
Python in general and with that pip and setuptools are aimed to be platform independent.
53
92
Man pages are **not**: they are a UNIX thing which means setuptools does not provide a sane solution to generate and install man pages.
54
93
We should consider using automatic man page installation only with vendor specific packaging, e.g. for `*.deb` or `*.rpm` packages.
55
94
56
-
#### (2) Man pages are not compatible with Python virtualenvs
95
+
### Man pages are not compatible with Python virtualenvs
57
96
58
97
Even on systems that support man pages, Python packages can be installed in
59
98
virtualenvs via pip and setuptools, which do not make commands available
@@ -66,7 +105,7 @@ versions of the same package into multiple different virtualenvs on the same
66
105
system, there is no guarantee that a globally installed man page will document
67
106
the version and behavior available in any given virtualenv.
68
107
69
-
#### (3) We want to generate man pages on the fly
108
+
### We want to generate man pages on the fly
70
109
71
110
First, we do not want to commit man pages to our source control.
72
111
We want to generate them on the fly, either during build or installation time.
@@ -75,26 +114,3 @@ With setuptools and pip we face two problems:
75
114
76
115
1. If we generate and install them during installation of the package pip does not know about the man pages and thus cannot uninstall it.
77
116
2. If we generate them in our build process and add them to your distribution we do not have a way to prevent installation to */usr/share/man* for non-UNIX-like Operating Systems or from within virtualenvs.
78
-
79
-
### Debian packages
80
-
81
-
The `debhelper` packages provides a very convenient script called `dh_installman`.
82
-
It checks for the `debian/(pkg_name.)manpages` file and it's content which is basically a line by line list of man pages or globs:
83
-
84
-
```
85
-
debian/tmp/manpages/*
86
-
```
87
-
88
-
We override the rule provided by `dh_installman` to generate our man pages in advance, like this:
0 commit comments