I am maintaining a package that includes several scripts, and I recently added a man page. Unfortunately, I was unable to figure out how to specify the man page with setuptools. I ended up switching back to vanilla distutils, which allowed me to specify the man page in setup.py: data_files=[('man/man1', ['man/man1/pssh.1'])] Is there an equivalent way to do this with setuptools? The closest thing I could find in the setuptools documentation was, "Note, by the way, that this encapsulation of data files means that you can't actually install data files to some arbitrary location on a user's machine; this is a feature, not a bug." I appreciate the well-intended thought, but I can't find any feature for specifying man pages. I don't want to install to an arbitrary location, but I need to be able to install to $PREFIX/man/man1). Is there a way to do this with setuptools, or do I need to keep using distutils? I would love to be able to use the "console_scripts" feature, so it would be great if I could use setuptools, but obviously the man pages are higher priority. I feel like I must be missing something obvious. Thanks. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
At 12:03 PM 1/25/2011 -0700, Andrew McNabb wrote:
I am maintaining a package that includes several scripts, and I recently added a man page. Unfortunately, I was unable to figure out how to specify the man page with setuptools. I ended up switching back to vanilla distutils, which allowed me to specify the man page in setup.py:
data_files=[('man/man1', ['man/man1/pssh.1'])]
Is there an equivalent way to do this with setuptools? The closest thing I could find in the setuptools documentation was, "Note, by the way, that this encapsulation of data files means that you can't actually install data files to some arbitrary location on a user's machine; this is a feature, not a bug." I appreciate the well-intended thought, but I can't find any feature for specifying man pages. I don't want to install to an arbitrary location, but I need to be able to install to $PREFIX/man/man1).
Is there a way to do this with setuptools, or do I need to keep using distutils? I would love to be able to use the "console_scripts" feature, so it would be great if I could use setuptools, but obviously the man pages are higher priority. I feel like I must be missing something obvious. Thanks.
Setuptools has a distutils-compatible installation mode: "setup.py install --single-version-externally-managed --record=somefile" It's a bit awkward to type, but it should do what you want.
On Tue, Jan 25, 2011 at 03:10:09PM -0500, P.J. Eby wrote:
Setuptools has a distutils-compatible installation mode:
"setup.py install --single-version-externally-managed --record=somefile"
It's a bit awkward to type, but it should do what you want.
But wouldn't this require all end users to know the incantation? Presumably I could add the following to the top of setup.py: sys.args += ['--single-version-externally-managed', '--record=somefile'] But that seems sort of dirty. :) -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
At 02:41 PM 1/25/2011 -0700, Andrew McNabb wrote:
On Tue, Jan 25, 2011 at 03:10:09PM -0500, P.J. Eby wrote:
Setuptools has a distutils-compatible installation mode:
"setup.py install --single-version-externally-managed --record=somefile"
It's a bit awkward to type, but it should do what you want.
But wouldn't this require all end users to know the incantation?
Well, those who want the man pages, certainly. ;-)
Presumably I could add the following to the top of setup.py:
sys.args += ['--single-version-externally-managed', '--record=somefile']
But that seems sort of dirty. :)
It also won't do anything if they're installing via another tool such as pip, easy_install, buildout, etc.
On Tue, Jan 25, 2011 at 05:46:40PM -0500, P.J. Eby wrote:
It also won't do anything if they're installing via another tool such as pip, easy_install, buildout, etc.
Do each of those support some way to install man pages? -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
At 03:53 PM 1/25/2011 -0700, Andrew McNabb wrote:
On Tue, Jan 25, 2011 at 05:46:40PM -0500, P.J. Eby wrote:
It also won't do anything if they're installing via another tool such as pip, easy_install, buildout, etc.
Do each of those support some way to install man pages?
I imagine one could write a buildout plugin that would do it. There was some discussion a while back about a buildout plugin for documentation. Really, distutils2 is probably a better candidate for solving this problem, but it's not yet released and in any case not widely installed as yet.
participants (2)
-
Andrew McNabb
-
P.J. Eby