Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

install script should install man pages #3

Closed
jjb opened this issue May 30, 2010 · 12 comments
Closed

install script should install man pages #3

jjb opened this issue May 30, 2010 · 12 comments

Comments

@jjb
Copy link

jjb commented May 30, 2010

you have the man pages… you have the install script… beautiful things could happen here, people.

@djl
Copy link
Owner

djl commented May 30, 2010

Agreed. I have no idea why I waited so long to do this.

Fixed in b837454 :)

@jjb
Copy link
Author

jjb commented May 30, 2010

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...)

@djl
Copy link
Owner

djl commented May 30, 2010

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 :)

@jjb
Copy link
Author

jjb commented May 30, 2010

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

@jjb
Copy link
Author

jjb commented May 30, 2010

(ignore the "git:master:(unknown)" bit on that first line -- that's something from my prompt)

@djl
Copy link
Owner

djl commented May 30, 2010

/System/Library/Frameworks/Python.framework/Versions/2.6/man/ probably isn't on your $MANPATH.

What does echo $MANPATH return?

@jjb
Copy link
Author

jjb commented May 30, 2010

it's empty!

@jjb
Copy link
Author

jjb commented May 30, 2010

(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?)

@djl
Copy link
Owner

djl commented May 30, 2010

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:

  1. Have setup.py do what it does now and adding them to /<sys.exec_prefix>/man.
  2. 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 :)

@jjb
Copy link
Author

jjb commented Jun 1, 2010

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.

@djl
Copy link
Owner

djl commented Jun 1, 2010

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.

@jjb
Copy link
Author

jjb commented Jun 1, 2010

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!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants