Install 0.84 on gentoo fails

Hi,

I wanted to install 0.84 on gentoo and get following error:

<snip>

muppets portage # emerge -av matplotlib

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild U ] dev-python/matplotlib-0.84 [0.83.2] -doc +gtk 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
  [1] /usr/local/ebuilds
  [2] /usr/local/gentoo-de

Do you want me to merge these packages? [Yes/No]

emerge (1 of 1) dev-python/matplotlib-0.84 to /
md5 files :wink: matplotlib-0.83.2.ebuild
md5 files :wink: matplotlib-0.84.ebuild
md5 files :wink: files/digest-matplotlib-0.84
md5 files :wink: files/digest-matplotlib-0.83.2
md5 src_uri :wink: matplotlib-0.84.tar.gz
Unpacking source...
Unpacking matplotlib-0.84.tar.gz to /var/tmp/portage/matplotlib-0.84/work
Source unpacked.

   File "setup.py", line 153
     try: import pytz
                    ^
IndentationError: unindent does not match any outer indentation level

!!! ERROR: dev-python/matplotlib-0.84 failed.
!!! Function distutils_src_compile, Line 35, Exitcode 1
!!! compilation failed
!!! If you need support, post the topmost build error, NOT this status message.

<snip>

In /var/tmp/portage/matplotlib-0.84/work/matplotlib-0.84/setup.py the area around line 153 looks like:

路路路

____________________________________________________

try: import datetime
except ImportError: havedate = False
else: havedate = True

if havedate: # dates require python23 datetime
     # only install pytz and dateutil if the user hasn't got them
     def add_pytz():
         packages.append('pytz')
         # install pytz subdirs
         for dirpath, dirname, filenames in os.walk(os.path.join('lib', 'pytz','zoneinfo')):
             packages.append('/'.join(dirpath.split(os.sep)[1:]))

     def add_dateutil():
         packages.append('dateutil')

     if sys.platform=='win32':
         # always add these to the win32 installer

             add_dateutil()
         try: import pytz <<<<<<<<<<<<<<<<<<<<<<<< line 153
         except ImportError:
             add_pytz()

build_swigagg(ext_modules, packages)
build_transforms(ext_modules, packages, NUMERIX)
build_enthought(ext_modules, packages)

_______________________________________________________________

Any hints ?

Thx

Werner

If you copied matplotlib-0.82.ebuild to your portage overlay, then I
think I know what's happening. In your new matplotlib-0.84.ebuild
file, change line 33 from:

    sed -i -e "151,+6d;158a\ add_dateutil()" setup.py

to:

    sed -i -e "154,+6d;161a\ add_dateutil()" setup.py

Looks like it's a kludge in the matplotlib ebuild, and the file
"setup.py" has changed a bit from version 0.82/0.83.

HTH,
Alok

路路路

On 26/09/05: 09:14, W. Pessenhofer wrote:

Hi,

I wanted to install 0.84 on gentoo and get following error:

<snip>

muppets portage # emerge -av matplotlib

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild U ] dev-python/matplotlib-0.84 [0.83.2] -doc +gtk 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
[1] /usr/local/ebuilds
[2] /usr/local/gentoo-de

  File "setup.py", line 153
    try: import pytz
                   ^
IndentationError: unindent does not match any outer indentation level

!!! ERROR: dev-python/matplotlib-0.84 failed.
!!! Function distutils_src_compile, Line 35, Exitcode 1
!!! compilation failed
!!! If you need support, post the topmost build error, NOT this status
message.

    if sys.platform=='win32':
        # always add these to the win32 installer

            add_dateutil()
        try: import pytz <<<<<<<<<<<<<<<<<<<<<<<<
        line 153

--
Alok Singhal __
Graduate Student, dept. of Astronomy / _
University of Virginia \_O \
http://www.astro.virginia.edu/~as8ca/ __/

Worked,

thx a lot. You were right, I just renamed

Regards

Werner

路路路

On Mon, 26 Sep 2005 10:01:57 +0200, Alok Singhal <as8ca@...809...> wrote:

On 26/09/05: 09:14, W. Pessenhofer wrote:

Hi,

I wanted to install 0.84 on gentoo and get following error:

<snip>

muppets portage # emerge -av matplotlib

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild U ] dev-python/matplotlib-0.84 [0.83.2] -doc +gtk 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
[1] /usr/local/ebuilds
[2] /usr/local/gentoo-de

  File "setup.py", line 153
    try: import pytz
                   ^
IndentationError: unindent does not match any outer indentation level

!!! ERROR: dev-python/matplotlib-0.84 failed.
!!! Function distutils_src_compile, Line 35, Exitcode 1
!!! compilation failed
!!! If you need support, post the topmost build error, NOT this status
message.

    if sys.platform=='win32':
        # always add these to the win32 installer

            add_dateutil()
        try: import pytz <<<<<<<<<<<<<<<<<<<<<<<<
        line 153

If you copied matplotlib-0.82.ebuild to your portage overlay, then I
think I know what's happening. In your new matplotlib-0.84.ebuild
file, change line 33 from:

    sed -i -e "151,+6d;158a\ add_dateutil()" setup.py

to:

    sed -i -e "154,+6d;161a\ add_dateutil()" setup.py

Looks like it's a kludge in the matplotlib ebuild, and the file
"setup.py" has changed a bit from version 0.82/0.83.

HTH,
Alok

--
DI Dr. Werner Pessenhofer

CPA - Computer Process Automation
Pl眉ddemanngasse33
8010 Graz
Tel.: +43 (0) 676 346 70 08
FAX: +43 (0) 316 873 8772