Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 100ad8b

Browse files
committed
some fixes for the binary builds
svn path=/branches/v0_99_maint/; revision=7329
1 parent 82d4ef2 commit 100ad8b

File tree

4 files changed

+74
-17
lines changed

4 files changed

+74
-17
lines changed

doc/faq/installing_faq.rst

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,66 @@ official OS X version from `python.org
287287
<http://www.python.org/download/>`_.
288288

289289

290+
.. _install_osx_binaries:
291+
292+
Installing OSX binaries
293+
-----------------------
294+
295+
If you want to install matplotlib from one of the binary installers we
296+
build, you have two choices: a mpkg installer, which is a typical
297+
Installer.app, or an binary OSX egg, which you can install via
298+
setuptools easy_install.
299+
300+
The mkpg installer will have a "zip" extension, and will have a name
301+
like file:`matplotlib-0.99.0.rc1-py2.5-macosx10.5.zip` depending on
302+
the python, matplotlib, and OSX versions. You need to unzip this file
303+
using either the "unzip" command on OSX, or simply double clicking on
304+
it to run StuffIt Expander. When you double click on the resultant
305+
mpkd directory, which will have a name like
306+
file:`matplotlib-0.99.0.rc1-py2.5-macosx10.5.mpkg`, it will run the
307+
Installer.app, prompt you for a password if you need system wide
308+
installation privileges, and install to a directory like
309+
file:`/Library/Python/2.5/site-packages/`, again depedending on your
310+
python version. This directory may not be in your python path, so you
311+
can test your installation with::
312+
313+
> python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__'
314+
315+
If you get an error like::
316+
317+
Traceback (most recent call last):
318+
File "<string>", line 1, in <module>
319+
ImportError: No module named matplotlib
320+
321+
then you will need to set your PYTHONPATH, eg::
322+
323+
export PYTHONPATH=/Library/Python/2.5/site-packages:$PYTHONPATH
324+
325+
See also ref:`environment-variables`.
326+
290327
.. _easy-install-osx-egg:
291328

292-
easy_install from egg?
329+
easy_install from egg
293330
------------------------------
294331

332+
You can also us the eggs we build for OSX (see the `installation
333+
instructions
334+
<http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other>`_
335+
for easy_install if you do not have it on your system already). You
336+
can try::
337+
338+
> easy_install matplotlib
339+
340+
which should grab the latest egg from the sourceforge site, but the
341+
naming conventions for OSX eggs appear to be broken (see below) so
342+
there is no guarantee the right egg will be found. We recommend you
343+
download the latest egg from our `download site
344+
<http://sourceforge.net/projects/matplotlib/files/>`_ directly to your
345+
harddrive, and manually install it with
346+
347+
> easy_install --install-dir=~/dev/lib/python2.5/site-packages/ matplotlib-0.99.0.rc1-py2.5-macosx-10.5-i386.egg
348+
349+
295350
Some users have reported problems with the egg for 0.98 from the
296351
matplotlib download site, with ``easy_install``, getting an error::
297352

doc/users/installing.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,17 @@ configuration details for you, so you can get up and running quickly::
6363
And a *voila*, a figure pops up. But we are putting the cart ahead of
6464
the horse -- first we need to get matplotlib installed. We provide
6565
prebuilt binaries for OS X and Windows on the matplotlib `download
66-
<http://sourceforge.net/project/showfiles.php?group_id=80706>`_ page.
67-
Click on the latest release of the "matplotlib" package, choose your
68-
python version (2.4 or 2.5) and your platform (macosx or win32) and
69-
you should be good to go. If you have any problems, please check the
66+
<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on
67+
the latest release of the "matplotlib" package, choose your python
68+
version (2.4 or 2.5) and your platform (macosx or win32) and you
69+
should be good to go. If you have any problems, please check the
7070
:ref:`installing-faq`, google around a little bit, and post a question
7171
the `mailing list
7272
<http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
7373

74+
Instructions for installing our OSX binaries are found in the FAQ
75+
ref:`install_osx_binaries`.
76+
7477
Note that when testing matplotlib installations from the interactive
7578
python console, there are some issues relating to user interface
7679
toolkits and interactive settings that are discussed in

release/osx/Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
PYTHON=python2.6
12
SRCDIR=${PWD}
23
ZLIBVERSION=1.2.3
34
PNGVERSION=1.2.33
45
FREETYPEVERSION=2.3.7
56
MPLVERSION=0.99.0.rc1
7+
BDISTMPKGVERSION=0.4.4
68
MPLSRC=matplotlib-${MPLVERSION}
79
MACOSX_DEPLOYMENT_TARGET=10.4
810

@@ -20,19 +22,18 @@ LDFLAGS_DEPS="-arch i386 -arch ppc -L${SRCDIR}/zlib-${ZLIBVERSION} -syslibroot,/
2022

2123
clean:
2224
rm -rf zlib-${ZLIBVERSION}.tar.gz libpng-${PNGVERSION}.tar.bz2 \
23-
freetype-${FREETYPEVERSION}.tar.bz2 bdist_mpkg-0.4.3.tar.gz \
24-
bdist_mpkg-0.4.3 \
25+
freetype-${FREETYPEVERSION}.tar.bz2 bdist_mpkg-${BDISTMPKGVERSION}.tar.gz \
26+
bdist_mpkg-${BDISTMPKGVERSION} \
2527
zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION} \
2628
matplotlib-${MPLVERSION} *~
2729

2830
fetch_deps:
2931
wget http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz &&\
3032
wget http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-${PNGVERSION}.tar.bz2 &&\
3133
wget http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2&&\
32-
wget http://pypi.python.org/packages/source/b/bdist_mpkg/bdist_mpkg-0.4.3.tar.gz&&\
33-
tar xvfz bdist_mpkg-0.4.3.tar.gz &&\
34-
patch -p0 < data/bdist.patch
35-
echo "You need to to install bdist_mpkg-0.4.3 now"
34+
wget http://pypi.python.org/packages/source/b/bdist_mpkg/bdist_mpkg-${BDISTMPKGVERSION}.tar.gz&&\
35+
tar xvfz bdist_mpkg-${BDISTMPKGVERSION}.tar.gz &&\
36+
echo "You need to to install bdist_mpkg-${BDISTMPKGVERSION} now"
3637

3738

3839

@@ -87,7 +88,7 @@ installers:
8788
export CFLAGS=${CFLAGS} &&\
8889
export LDFLAGS=${LDFLAGS} &&\
8990
bdist_mpkg &&\
90-
python setupegg.py bdist_egg &&\
91+
${PYTHON} setupegg.py bdist_egg &&\
9192
cd dist && \
9293
zip -ro matplotlib-${MPLVERSION}-py2.5-macosx10.5.zip matplotlib-${MPLVERSION}-py2.5-macosx10.5.mpkg
9394

release/osx/README.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ Dir Contents
77
-------------
88

99
* :file:`bdist_mkpg` - the distutils.extension to build Installer.app
10-
mpkg installers. It is patched from the tarball with
11-
file:`data/bdist.patch` because 0.4.3 is broken on OS X 10.5.
12-
Instructions on how to patch and install are below
10+
mpkg installers.
1311

1412
* :file:`data` - some config files and patches needed for the build
1513

@@ -38,7 +36,7 @@ How to build
3836

3937
* install the patched bdist_mpkg, that the fetch_deps step just created::
4038

41-
cd bdist_mpkg-0.4.3
39+
cd bdist_mpkg-0.4.4
4240
sudo python setup.py install
4341

4442
* build the dependencies::
@@ -64,7 +62,7 @@ Build the dependencies::
6462
cd release/osx/
6563
unset PKG_CONFIG_PATH
6664
make fetch_deps
67-
cd bdist_mpkg-0.4.3
65+
cd bdist_mpkg-0.4.4
6866
sudo python setup.py install
6967
cd ..
7068
make dependencies

0 commit comments

Comments
 (0)