Skip to content

Issues with man pages #2374

Closed
astrofrog opened this Issue Sep 2, 2012 · 15 comments

4 participants

@astrofrog

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?

@takluyver
IPython member

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.

@astrofrog

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?

@astrofrog

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

@astrofrog

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.

@takluyver
IPython member

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
@astrofrog

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

@takluyver
IPython member

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]
@astrofrog

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

@takluyver
IPython member

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

@takluyver
IPython member

Great, I look forward to reading it.

@astrofrog

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

@minrk
IPython member
minrk commented Sep 4, 2012

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

@bfroehle

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

@takluyver
IPython member
@bfroehle

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?

@minrk minrk added a commit that closed this issue Oct 11, 2012
@minrk 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
@minrk minrk closed this in fcc0c73 Oct 11, 2012
@mindw mindw added a commit to mindw/ipython that referenced this issue Oct 18, 2012
@minrk 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.