Skip to content
This repository

Issues with man pages #2374

Closed
astrofrog opened this Issue · 15 comments

4 participants

Thomas Robitaille Thomas Kluyver Min RK Bradley M. Froehle
Thomas Robitaille

I've run into issues with how ipython installs its man pages:

  • Since 0.13, the man pages are no longer gzipped when installed - I just wanted to check if this is intentional?

  • When installing ipython with Python 3.2, the man pages are not installed - is this normal?

Thomas Kluyver
Collaborator

Are you sure they're not installed by Python 3? Looking at the code, I think they'll be installed, but they'll still be called ipython etc. without the 3 suffix.

Thomas Robitaille

Here's a log of the Python 2.7 install: http://pastebin.com/L4RJXnVn

It contains:

creating /Users/tom/Library/Python/2.7/share
creating /Users/tom/Library/Python/2.7/share/man
creating /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/ipcluster.1 -> /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/ipcontroller.1 -> /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/ipengine.1 -> /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/iplogger.1 -> /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/ipython.1 -> /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/irunner.1 -> /Users/tom/Library/Python/2.7/share/man/man1
copying docs/man/pycolor.1 -> /Users/tom/Library/Python/2.7/share/man/man1

Here's a log of the Python 3.2 install: http://pastebin.com/7k9zDyty

and you'll see there are never such lines. Any ideas?

Thomas Robitaille

For the record, I'm on MacOS 10.6.8, and installing from 6f74560

Thomas Robitaille

The closest there is in the 3.2 log is:

creating build/bdist.macosx-10.6-x86_64/egg/share
creating build/bdist.macosx-10.6-x86_64/egg/share/man
creating build/bdist.macosx-10.6-x86_64/egg/share/man/man1

but it never copies the actual man pages.

Thomas Kluyver
Collaborator

On Linux I get a block of lines like this:

copying docs/man/irunner.1.gz -> build/bdist.linux-i686/egg/share/man/man1
copying docs/man/ipython.1.gz -> build/bdist.linux-i686/egg/share/man/man1
copying docs/man/ipcontroller.1.gz -> build/bdist.linux-i686/egg/share/man/man1
copying docs/man/pycolor.1.gz -> build/bdist.linux-i686/egg/share/man/man1
copying docs/man/ipengine.1.gz -> build/bdist.linux-i686/egg/share/man/man1
copying docs/man/ipcluster.1.gz -> build/bdist.linux-i686/egg/share/man/man1
copying docs/man/iplogger.1.gz -> build/bdist.linux-i686/egg/share/man/man1
Thomas Robitaille

Interesting - I also tried on MacOS 10.7 and I have the same issue (and I tried installing into a virtualenv, and also didn't have any success).

Thomas Kluyver
Collaborator

From the IPython checkout root directory, can you try this under Python 2 and 3:

import setupbase
[x for x in setupbase.find_data_files()][0]
Thomas Robitaille

I think I've identified the issue, I will submit a PR shortly.

Thomas Kluyver
Collaborator

...of course, the list comprehension in that last line is pointless. I was fiddling around with different things and forgot about it. setupbase.find_data_files()[0] works just as well.

Thomas Kluyver
Collaborator

Great, I look forward to reading it.

Thomas Robitaille

I've opened a pull request in #2377. The reason that I say the fix is partial is because I do now get the same lines as you, i.e.

creating build/bdist.macosx-10.7-x86_64/egg/share
creating build/bdist.macosx-10.7-x86_64/egg/share/man
creating build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/ipcluster.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/ipcontroller.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/ipengine.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/iplogger.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/ipython.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/irunner.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1
copying docs/man/pycolor.1 -> build/bdist.macosx-10.7-x86_64/egg/share/man/man1

but when installed, the man pages stay inside the egg, and aren't installed to the actual share directory in the normal Python install tree. But this is a separate issue, which probably affects you too. Do you think this should be fixed? (in Python 2.7, the man pages get installed to the proper Python tree share directory).

Min RK
Owner

Do we want this one in 0.13.1? Seems like it.

Bradley M. Froehle
Collaborator

The python3 behavior is pretty similar to using the setupegg.py file in python2. In particular, I wasn't able to get the man pages to install as you would except without adding the --single-version-externally-managed flag.

As far as I know there is no facility to rename the files on installation, so we'll need another mechanism to have the correct man page names (ipython3, etc).

Thomas Kluyver
Collaborator
Bradley M. Froehle
Collaborator

Now that #2377 has been merged, is there a remaining task here? The python3 man page names do not match the program names (ipython.1, not ipython3.1)... but how can this be addressed?

Min RK minrk closed this issue from a commit
Min RK minrk Backport PR #2377: Fix installation of man pages in Python 3
This fixes a bug that caused man pages to not be installed in Python 3 when running from the source tree. The issue was that in Python 3, an empty filter is not an empty list, so ``if not manpages`` could not be satisfied. By using ``list()``, we can ensure that we convert the filter iterator to a list in Python 3. This partially fixes #2374.
fcc0c73
Min RK minrk closed this in fcc0c73
Gabi Davar mindw referenced this issue from a commit in mindw/ipython
Min RK minrk Backport PR #2377: Fix installation of man pages in Python 3
This fixes a bug that caused man pages to not be installed in Python 3 when running from the source tree. The issue was that in Python 3, an empty filter is not an empty list, so ``if not manpages`` could not be satisfied. By using ``list()``, we can ensure that we convert the filter iterator to a list in Python 3. This partially fixes #2374.
2e1e35f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.