install script should install man pages
Closed this issue · 12 comments
you have the man pages… you have the install script… beautiful things could happen here, people.
sweet! although i just ran it again and the man pages weren't installed. maybe because easy_install didn't see a new version. (i'm a python newbie...)
Ah, yeah. Since I didn't bump the version number, easy_install thinks it hasn't been updated.
Manually running python setup.py install
(and possibly easy_install -U
) will install/update the manpages :)
Thanks.
Seems like it's still not working for me -- might be because of OS X's atypical python setup?
± sudo python setup.py install git:master:(unknown)
running install
running build
running build_scripts
running install_scripts
changing mode of /usr/local/bin/vcprompt to 755
running install_data
creating /System/Library/Frameworks/Python.framework/Versions/2.6/man
creating /System/Library/Frameworks/Python.framework/Versions/2.6/man/man1
copying man/vcprompt.1 -> /System/Library/Frameworks/Python.framework/Versions/2.6/man/man1
creating /System/Library/Frameworks/Python.framework/Versions/2.6/man/man5
copying man/vcprompt.5 -> /System/Library/Frameworks/Python.framework/Versions/2.6/man/man5
running install_egg_info
Writing /Library/Python/2.6/site-packages/vcprompt-vcprompt.0.1.4-py2.6.egg-info
/Users/john/src/vcprompt
± man vcprompt git:master:(unknown)
No manual entry for vcprompt
(ignore the "git:master:(unknown)" bit on that first line -- that's something from my prompt)
/System/Library/Frameworks/Python.framework/Versions/2.6/man/
probably isn't on your $MANPATH
.
What does echo $MANPATH
return?
it's empty!
(but manpages work for most/all other things… i guess i need to manually add that to my manpath? is there a more standard place that the manpages can be placed? /usr/local/man?)
Now I remember why I wasn't distributing manpages with setup.py (and to a lesser extent, why there was no mention of it in the README). There's no ideal way of doing it.
Two ways immediately spring to mind:
- Have setup.py do what it does now and adding them to
/<sys.exec_prefix>/man
. - Place manpages into
/usr/local/man
.
The first option is the easiest and is what some packages (nose and Bazaar, for example) already do. The downside is that this probably isn't on most people's MANPATH.
The second is the most 'standard' but assumes that everyone always installs packages with sudo and always to the default Python packages directory. I haven't tested, but I assume this would also break installing things into a virtualenv.
Personally, I never install anything outside of my own home directory so I'm not in favour of this way.
Another idea would be to write a custom distutils command which prompts for where to install manpages. Something like:
$ python setup.py install-manpages [-p /some/path/]
Path to install manpages [<sys.exec_prefix>]:
This is definitely not standard but would be flexible enough to suit everyone.
But, on the other hand, most people who actually know what manpages are and how to use them probably know how to install them manually. Everyone else just looks at the built in '--help' text or looks at the online docs.
Argh. I'm either over- or under-thinking this, so if anyone else has any opinions feel free to chime in :)
Hmm, well -- in ruby land, this might be packages as a gem. There would be a standard place to put the man page. But if a particular user chose to install their gem environment in a different place (such as in their home directory), it would have a natural correlating place to put the man pages as well.
And in a straight traditional source install with configure, make, make install, everything goes under the specified prefix. the default is /usr/local, and someone might chose to use ~/ instead.
So, I think i didn't tell you anything you didn't know :) but i guess i am suggesting some notion of a prefix. Now, if there is a standard way to do this with easy_install, even better.
I am an idiot.
If I had installed my Python into /usr/local
, the man pages would automatically go in the right place. I confused myself with my own non-standard install.
So yeah, everything works fine already. No need for my MacGyver-esque solution.
So I guess my problem is OS X's funky python location on my end.
This shows me lots of symlinks to the /System/Library/Frameworks…. paths.
ls -lF /usr/share/man/man1/ |grep '>'
so i guess those packages have to detect if the system is os x, and then manually make the symlinks… sad/annoying. not sure if there is a slicker way to do that.
anyway, enough of this madness -- thanks!