You are not logged in.
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
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
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
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
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
Suggestions :
* add python-distribute to makedepends
* "|| return 1"s are not needed
Offline
Thanks everyone for the feedback! I've made the following changes:
renamed the package to python3-matplotlib-git
new url: http://aur.archlinux.org/packages.php?ID=49870 (I wasn't sure how to rename a package without just uploading a new one... Maybe a TU can delete the old one?)
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
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.2Any 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.2is 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.000000Last edited by aganders3 (2011-09-08 17:17:06)
Offline
I was just going to say that
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.000000similar 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
I was just going to say that
aganders3 wrote:backend agg version v2.2that 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.000000similar 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
Hooray! It's working now - all I had to do (after trying a bunch of stupid things) was add
backend : Qt4Aggto my matplotlibrc file.
Thanks!
Offline