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

Already on GitHub? Sign in to your account

Reintroduce examples.directory rc parameter #1479

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

The main reason is that in Debian we store sample_data in a directory outside
the Python modules location. This way we're able to specify that directory in a
more appropriate way, also to allow examples to work during package building (in
particular for the documentation part).

The code introduced is a partial revert of 6c5e961 (with very tiny changes).

See also: #1478

@sandrotosi sandrotosi Reintroduce examples.directory rc parameter
The main reason is that in Debian we store sample_data in a directory outside
the Python modules location.  This way we're able to specify that directory in a
more appropriate way, also to allow examples to work during package building (in
particular for the documentation part).

The code introduced is a partial revert of 6c5e961 (with very tiny changes).
f5c67c3
Member

dmcdougall commented Nov 11, 2012

It looks like examples.directory was removed in 6c5e961. This is just for reference, and also when I read this PR I remember there was some chatter on the mailing list about sample_data being removed.

Member

dmcdougall commented Nov 11, 2012

Oh you already had the commit link in the original message -- I am apparently blind.

Member

dmcdougall commented Nov 11, 2012

I think this is ok to merge, but I'm not a debian expert. Is there someone else more familiar with debian that can weigh in? I presume installed the sample_data in the same directory as the matplotlib module is not an acceptable solution?

It's not acceptable because python 2.x has different modules directory for any minor version: 2.6 and 2.7 uses 2 different dirs, so we will need to duplicate the directory, or symlink it; and then we have the py3k module dir, and we need to handle that too.

Debian policy specify to store data files in /usr/share (if binary independent) or /usr/lib/ , that's why the Debian package stores them in /usr/share/matplotlib .

Owner

mdboom commented Nov 12, 2012

Thanks. This looks fine. I had not realised that Debian was relying on the behavior when I made the change -- the real purpose of the commit was to remove the network accessing of sample data, which never worked for very long before breaking.

In the future, we should coordinate better about release candidates so we can catch these sorts of packaging issues before the final release.

Can you rebase against v1.2.x and resubmit the pull request? I think this really belongs on the maintenance branch.

Hi Michael,
Don't worry, I hadn't realized it either, until a user complained :) Additionally, I tested all the RCs that you released and still hadn't notice because during build-time the sample_data inside the module directory is used (so images are generated correctly) but then if you run an example with the debian package installed, it failed (and now we see that I don't run examples that much on my machine :)).

I've filed #1491 - let me know if it's ok.

Member

dmcdougall commented Nov 13, 2012

Resolved by #1491.

@dmcdougall dmcdougall closed this Nov 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment