You are not logged in.

#1 2011-06-14 16:36:45

mitch_feaster
Member
From: San Diego, CA
Registered: 2011-02-27
Posts: 55
Website

python-matplotlib-git (matplotlib with python3!!!) -- want to test?

I've just cooked up a pkgbuild for python-matplotlib (python3!) from this fork of matplotlib. Here's the link on AUR:

http://aur.archlinux.org/packages.php?ID=49810 (edit: new url => http://aur.archlinux.org/packages.php?ID=49870)

It's working for me, but since I'm new to packaging on Arch (so it's perfectly conceivable that I've totally boofed it) is there anyone else out there currently using matplotlib under python2 that would be interested in trying this baby out?

Last edited by mitch_feaster (2011-06-15 18:42:46)

Offline

#2 2011-06-15 06:16:28

hseara
Member
From: Tampere
Registered: 2010-03-24
Posts: 11

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

How come it is for python 3 and you still add a conflict with the python 2 version:

conflicts=('python2-matplotlib')

Both packages should be able to coexist.

Offline

#3 2011-06-15 06:22:18

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,360

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

hseara wrote:

How come it is for python 3 and you still add a conflict with the python 2 version:

conflicts=('python2-matplotlib')

Both packages should be able to coexist.

Not if the binary/script shares the same name in /usr/bin


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2011-06-15 14:20:19

beretta
Member
Registered: 2008-04-21
Posts: 133

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

matplotlib should install to /usr/lib/python#.#/site-packages, and so I think it ought to coexist, as it would install to python3.2 rather than python2.7.

I did try out the install with removing the conflicts line, but it still shows a conflict; I think python2-matplotlib is already set with a conflict to python-matplotlib-git?

I would love to test this out, but need to be able to keep the python2 version for my work. Anyone know of a way to work around this?

Offline

#5 2011-06-15 14:31:33

beretta
Member
Registered: 2008-04-21
Posts: 133

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

Nevermind-- I figured out the problem:

matplotlib used to be provided by the package python-matplotlib. When it was changed to python2-matplotlib, it was set to conflict with python-matplotlib. Change the provides to something like:

provides=('python-matplotlib-git')

or

provides=('python3-matplotlib')

remove the line

conflicts=('python2-matplotlib')

and it works.

I did verify that the new package installs to /usr/lib/python3.2/site-packages while python2-matplotlib installs to /usr/lib/python2.7/site-packages.  No conflict; these are able to coexist with the above change.

Thanks for putting the PKGBUILD together!

Last edited by beretta (2011-06-15 14:32:48)

Offline

#6 2011-06-15 14:39:04

stephane
Forum Fellow
Registered: 2009-10-18
Posts: 25

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

Suggestions :

* add python-distribute to makedepends
* "|| return 1"s are not needed

Offline

#7 2011-06-15 18:40:09

mitch_feaster
Member
From: San Diego, CA
Registered: 2011-02-27
Posts: 55
Website

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

Thanks everyone for the feedback! I've made the following changes:

  • renamed the package to python3-matplotlib-git

  • changed provides to python3-matplotlib

  • removed python2-matplotlib from conflicts (verified that parallel installation is fine)

  • proper handling of the custom license

  • got rid of `|| return 1`s

@stephane Although adding python-distribute to makedepends seems pretty logical, I'm holding off on doing so because matplotlib bundles `setupext.py` and I'm pretty sure `distutils` is part of the Python standard library... I don't have python-distribute installed but it builds and installs fine for me...

Last edited by mitch_feaster (2011-06-15 18:51:35)

Offline

#8 2011-09-08 16:50:16

aganders3
Member
Registered: 2010-04-06
Posts: 8

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

I'm having some problems with this package. Everything installs OK now - I had some problems with the dateutils conflict, but I think that's sorted - but nothing comes up when running the following commands:

import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.show()

If I run it as a script with --verbose-helpful....it's really not very helpful (to me). Here is the output:

$HOME=/home/username
CONFIGDIR=/home/username/.matplotlib
matplotlib data path /usr/lib/python3.2/site-packages/matplotlib/mpl-data
loaded rc file /user/lib/python3.2/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 1.1.0
verbose.level helpful
interactive is False
platform is linux2
Using fontManager instance from /home/username/.matplotlib/fontList.py3k.cache
backend agg version v2.2

Any thoughts?

Edit: I should note that this script works perfectly fine using python2 and matplotlib 1.0.1. The only difference in output from --verbose-helpful is:

backend agg version v2.2

is gone, and the following lines are added:

backend Qt4Agg version 0.9.1
findFont: Matching :family=sans-serif:style=normal:variant=normal:stretch=normal:size=medium to Bitsream Vera Sans (/path/to/ttf) with score of 0.000000

Last edited by aganders3 (2011-09-08 17:17:06)

Offline

#9 2011-09-08 17:28:35

mitch_feaster
Member
From: San Diego, CA
Registered: 2011-02-27
Posts: 55
Website

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

I was just going to say that

aganders3 wrote:
backend agg version v2.2

that is your problem. I get

backend TkAgg version 8.5
findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Bitstream Vera Sans (/usr/lib/python3.2/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) with score of 0.000000

similar to what you get with python2. I'll have to double-check how the backend is chosen and maybe make it an optional dependency for the package. Hopefully I can do this later tonight. If this is urgent, you can try installing some of the packages described here and try rebuilding to see if it pulls in a more useful backend.

Offline

#10 2011-09-08 17:51:27

aganders3
Member
Registered: 2010-04-06
Posts: 8

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

mitch_feaster wrote:

I was just going to say that

aganders3 wrote:
backend agg version v2.2

that is your problem. I get

backend TkAgg version 8.5
findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Bitstream Vera Sans (/usr/lib/python3.2/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) with score of 0.000000

similar to what you get with python2. I'll have to double-check how the backend is chosen and maybe make it an optional dependency for the package. Hopefully I can do this later tonight. If this is urgent, you can try installing some of the packages described here and try rebuilding to see if it pulls in a more useful backend.

Thanks for the reply! It's not urgent, so please feel free to take your time. I'll play around with some of the other backends in the meantime. I appreciate the help.

Offline

#11 2011-09-08 19:06:26

aganders3
Member
Registered: 2010-04-06
Posts: 8

Re: python-matplotlib-git (matplotlib with python3!!!) -- want to test?

Hooray! It's working now - all I had to do (after trying a bunch of stupid things) was add

backend : Qt4Agg

to my matplotlibrc file.

Thanks!

Offline

Board footer

Powered by FluxBB