Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upTemplate files are searched for in the wrong location #2
Comments
This comment has been minimized.
This comment has been minimized.
|
Thank you so much for the bug report. This is unfortunate. I was under the impression that
And indeed, I'm using relative paths: data_files=[('share/pdoc', ['README.md', 'longdesc.rst',
'UNLICENSE', 'INSTALL', 'CHANGELOG']),
('share/pdoc/doc', ['doc/pdoc.m.html']),
('share/pdoc/templates', glob('templates/*')),
],So it strikes me as exceedingly odd that the data files were installed with a I wonder if it's possible to force the prefix. Maybe the Hang tight for a work-around... |
This comment has been minimized.
This comment has been minimized.
|
If you copy the files in the |
This comment has been minimized.
This comment has been minimized.
|
Yes, strange indeed. Looks like pip is supposed to install the file relative to sys.prefix, and your code is trying to read them relative to sys.prefix. So my conclusion is that the problem is not in pdoc... Thanks for the workaround! I will try to reinstall pip in a different way first, though. I have a feeling that I'm not using the most common method. |
This comment has been minimized.
This comment has been minimized.
The method you described in your initial comment is exactly how it should be installed. :-) But certainly, if you try other things and meet with success, I'd love to hear about them. |
This comment has been minimized.
This comment has been minimized.
|
This seems to be caused by Debian's packaging of Python: https://wiki.debian.org/Python (section "Deviations from upstream")
So the promise that |
This comment has been minimized.
This comment has been minimized.
|
Installing pip by downloading and running |
This comment has been minimized.
This comment has been minimized.
|
Ug. There's got to be some sort of work-around, otherwise every Python package that uses |
This comment has been minimized.
This comment has been minimized.
|
Ah, what if I switch to Unfortunately, this requires switching from a module to a package. I don't mind doing that if it works around Debian's policies. |
This comment has been minimized.
This comment has been minimized.
|
Why don't you want to switch from module to package? Simplicity? Aesthetics? You could rename
But perhaps this wasn't the issue... |
This comment has been minimized.
This comment has been minimized.
|
Simplicity. It's nice to have a single file instead of a package. But this isn't a good enough reason IMO if it's breaking installs on a popular Linux distro. And get those relative imports off my lawn! I'm fine with just slapping everything into |
This comment has been minimized.
This comment has been minimized.
|
I see. :-) I really appreciate you making these changes! |
BurntSushi
closed this
in
ba1dd44
Feb 21, 2014
This comment has been minimized.
This comment has been minimized.
|
@raek I'm hoping this fixes things. Please let me know if it doesn't and I'll re-open the issue. (This marks the release of |
This comment has been minimized.
This comment has been minimized.
|
@BurntSushi: It works now. Thanks a lot! |
raek commentedFeb 20, 2014
I'm trying to use pdoc on a installed-two-weeks-ago Debian Jessie machine, but I get this message:
I installed python (2.7.6) and pip via apt-get:
I installed pdoc via pip:
I can see that the html.mako template file exists in the
/usr/local/share/pdoctree, but pdoc seems to look for it in/usr/share/pdoc. After a quick glance at the pdoc code, it seems to get the prefix from thesys.prefixattribute, which seems to have the value/usron my computer. Apparently pip used another prefix when it installed the files.I don't think I have set up things in a weird way, but please tell me if you want me to try something. I would be happy to help debugging this, but I don't know where to start.