Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with man pages #2374

Closed
astrofrog opened this issue Sep 2, 2012 · 15 comments · Fixed by #2377
Closed

Issues with man pages #2374

astrofrog opened this issue Sep 2, 2012 · 15 comments · Fixed by #2377
Labels
Milestone

Comments

@astrofrog
Copy link
Contributor

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
Copy link
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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@astrofrog
Copy link
Contributor Author

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
Copy link
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
Copy link
Contributor Author

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
Copy link
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
Copy link
Contributor Author

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

@takluyver
Copy link
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
Copy link
Member

Great, I look forward to reading it.

@astrofrog
Copy link
Contributor Author

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
Copy link
Member

minrk commented Sep 4, 2012

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

@bfroehle
Copy link
Contributor

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
Copy link
Member

That makes sense - setupegg.py runs setup.py with setuptools/distribute,
and under Python 3 setup.py always runs with distribute.

@bfroehle
Copy link
Contributor

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 closed this as completed in fcc0c73 Oct 11, 2012
mindw pushed a commit to mindw/ipython that referenced this issue Oct 18, 2012
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 ipython#2374.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants