Repository: ipython/ipython

Issue:
Issues with man pages
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?



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

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?

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

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.

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

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

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]
```

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

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

Great, I look forward to reading it.


Resolving patch:
diff --git a/setupbase.py b/setupbase.py
--- a/setupbase.py
+++ b/setupbase.py
@@ -204,12 +204,12 @@ def find_data_files():
     manpagebase = pjoin('share', 'man', 'man1')
 
     # Simple file lists can be made by hand
-    manpages  = filter(isfile, glob(pjoin('docs','man','*.1.gz')))
+    manpages = [f for f in glob(pjoin('docs','man','*.1.gz')) if isfile(f)]
     if not manpages:
         # When running from a source tree, the manpages aren't gzipped
-        manpages = filter(isfile, glob(pjoin('docs','man','*.1')))
-    igridhelpfiles = filter(isfile,
-                            glob(pjoin('IPython','extensions','igrid_help.*')))
+        manpages = [f for f in glob(pjoin('docs','man','*.1')) if isfile(f)]
+
+    igridhelpfiles = [f for f in glob(pjoin('IPython','extensions','igrid_help.*')) if isfile(f)]
 
     # For nested structures, use the utility above
     example_files = make_dir_struct(


Test patch: