From: Mensanator on
Ok, so I got a MacBook Air.

Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed.

So I install Xcode, download macports and download gmpy-1.11rc1.

Following the instructions in mac_build.txt, I do the following:

- sudo /opt/local/bin/port install gmp

This works fine.

Then I do

- python setup.py install

This also works (a few warnings, but nothing looked serious).

Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmpy
>>> gmpy.version()
'1.11'

python gmpy_test.py
Unit tests for gmpy 1.11
on Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)]
Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
gmpy_test_cvr 151 tests, 0 failures
..
..
..
25 tests in gmpy_test_rnd.__test__.rand
1469 tests in 42 items.
1469 passed and 0 failed.
Test passed.

Looks like a viable gmpy module for 2.6.

What do I do AFTER I install Python 3.1? Just running python3.1 from
the
same directory doesn't work.

I've spent the last 5 days trying to figure that out. I hosed it so
bad
I somehow wrecked the 2.6 version to the point where it won't even
load.

I just got done doing a factory restore of the entire OS to undo
everything
I did. Re-did all the above and got it back working. Haven't re-
installed 3.1
yet.

Anbody have any idea how to make this work?
From: Benjamin Kaplan on
On Thu, Dec 24, 2009 at 9:11 PM, Mensanator <mensanator(a)aol.com> wrote:
> Ok, so I got a MacBook Air.
>
> Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed.
>
> So I install Xcode, download macports and download gmpy-1.11rc1.
>
> Following the instructions in mac_build.txt, I do the following:
>
> - sudo /opt/local/bin/port install gmp
>
> This works fine.
>
> Then I do
>
> - python setup.py install
>
> This also works (a few warnings, but nothing looked serious).
>
> Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import gmpy
>>>> gmpy.version()
> '1.11'
>
> python gmpy_test.py
> Unit tests for gmpy 1.11
>    on Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
> [GCC 4.2.1 (Apple Inc. build 5646)]
> Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
> gmpy_test_cvr 151 tests, 0 failures
> .
> .
> .
>  25 tests in gmpy_test_rnd.__test__.rand
> 1469 tests in 42 items.
> 1469 passed and 0 failed.
> Test passed.
>
> Looks like a viable gmpy module for 2.6.
>
> What do I do AFTER I install Python 3.1? Just running python3.1 from
> the
> same directory doesn't work.
>
> I've spent the last 5 days trying to figure that out. I hosed it so
> bad
> I somehow wrecked the 2.6 version to the point where it won't even
> load.
>
> I just got done doing a factory restore of the entire OS to undo
> everything
> I did. Re-did all the above and got it back working. Haven't re-
> installed 3.1
> yet.
>
> Anbody have any idea how to make this work?

Did you run setup.py with python3? Python 3.1 won't install itself as
the default python install for compatibility reasons so you have to
run "python3 install setup.py" to install it for that version of
python.

> --
> http://mail.python.org/mailman/listinfo/python-list
>
From: Mensanator on
On Dec 24, 10:18 pm, Benjamin Kaplan <benjamin.kap...(a)case.edu> wrote:
> On Thu, Dec 24, 2009 at 9:11 PM, Mensanator <mensana...(a)aol.com> wrote:
> > Ok, so I got a MacBook Air.
>
> > Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed.
>
> > So I install Xcode, download macports and download gmpy-1.11rc1.
>
> > Following the instructions in mac_build.txt, I do the following:
>
> > - sudo /opt/local/bin/port install gmp
>
> > This works fine.
>
> > Then I do
>
> > - python setup.py install
>
> > This also works (a few warnings, but nothing looked serious).
>
> > Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
> > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import gmpy
> >>>> gmpy.version()
> > '1.11'
>
> > python gmpy_test.py
> > Unit tests for gmpy 1.11
> >    on Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
> > [GCC 4.2.1 (Apple Inc. build 5646)]
> > Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
> > gmpy_test_cvr 151 tests, 0 failures
> > .
> > .
> > .
> >  25 tests in gmpy_test_rnd.__test__.rand
> > 1469 tests in 42 items.
> > 1469 passed and 0 failed.
> > Test passed.
>
> > Looks like a viable gmpy module for 2.6.
>
> > What do I do AFTER I install Python 3.1? Just running python3.1 from
> > the
> > same directory doesn't work.
>
> > I've spent the last 5 days trying to figure that out. I hosed it so
> > bad
> > I somehow wrecked the 2.6 version to the point where it won't even
> > load.
>
> > I just got done doing a factory restore of the entire OS to undo
> > everything
> > I did. Re-did all the above and got it back working. Haven't re-
> > installed 3.1
> > yet.
>
> > Anbody have any idea how to make this work?
>
> Did you run setup.py with python3? Python 3.1 won't install itself as
> the default python install for compatibility reasons so you have to
> run "python3 install setup.py" to install it for that version of
> python.

I wondered why there was both python3 and python3.1 in the bin
directory.

But why, when I type...

$ python3

....do I get...

Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
[1]+ Stopped python3

I get the same result with python3.1.

So, no, trying python3 is of no help, same errors as before.
There's hundreds of them, but they start out

$ /Library/Frameworks/Python.framework/Versions/3.1/bin/python3
setup.py install
running install
running build
running build_ext
building 'gmpy' extension
creating build/temp.macosx-10.3-fat-3.1
creating build/temp.macosx-10.3-fat-3.1/src
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/
MacOSX10.4u.sdk
Please check your Xcode installation
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -I./src -I/
opt/local/include -I/Library/Frameworks/Python.framework/Versions/3.1/
include/python3.1 -c src/gmpy.c -o build/temp.macosx-10.3-fat-3.1/src/
gmpy.o
In file included from src/gmpy.c:206:
/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
Python.h:11:20: error: limits.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
Python.h:14:2: error: #error "Something's broken. UCHAR_MAX should be
defined in limits.h."
/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
Python.h:18:

Any other ideas? Do I have to install a separate Python 3?

>
>
>
> > --
> >http://mail.python.org/mailman/listinfo/python-list

From: Benjamin Kaplan on
On Fri, Dec 25, 2009 at 1:48 AM, Mensanator <mensanator(a)aol.com> wrote:
> On Dec 24, 10:18 pm, Benjamin Kaplan <benjamin.kap...(a)case.edu> wrote:
>> On Thu, Dec 24, 2009 at 9:11 PM, Mensanator <mensana...(a)aol.com> wrote:
>> > Ok, so I got a MacBook Air.
>>
>> > Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed.
>>
>> > So I install Xcode, download macports and download gmpy-1.11rc1.
>>
>> > Following the instructions in mac_build.txt, I do the following:
>>
>> > - sudo /opt/local/bin/port install gmp
>>
>> > This works fine.
>>
>> > Then I do
>>
>> > - python setup.py install
>>
>> > This also works (a few warnings, but nothing looked serious).
>>
>> > Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
>> > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
>> > Type "help", "copyright", "credits" or "license" for more information.
>> >>>> import gmpy
>> >>>> gmpy.version()
>> > '1.11'
>>
>> > python gmpy_test.py
>> > Unit tests for gmpy 1.11
>> >    on Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
>> > [GCC 4.2.1 (Apple Inc. build 5646)]
>> > Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
>> > gmpy_test_cvr 151 tests, 0 failures
>> > .
>> > .
>> > .
>> >  25 tests in gmpy_test_rnd.__test__.rand
>> > 1469 tests in 42 items.
>> > 1469 passed and 0 failed.
>> > Test passed.
>>
>> > Looks like a viable gmpy module for 2.6.
>>
>> > What do I do AFTER I install Python 3.1? Just running python3.1 from
>> > the
>> > same directory doesn't work.
>>
>> > I've spent the last 5 days trying to figure that out. I hosed it so
>> > bad
>> > I somehow wrecked the 2.6 version to the point where it won't even
>> > load.
>>
>> > I just got done doing a factory restore of the entire OS to undo
>> > everything
>> > I did. Re-did all the above and got it back working. Haven't re-
>> > installed 3.1
>> > yet.
>>
>> > Anbody have any idea how to make this work?
>>
>> Did you run setup.py with python3? Python 3.1 won't install itself as
>> the default python install for compatibility reasons so you have to
>> run "python3 install setup.py" to install it for that version of
>> python.
>
> I wondered why there was both python3 and python3.1 in the bin
> directory.
>
> But why, when I type...
>
> $ python3
>
> ...do I get...
>
> Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
> [1]+  Stopped                 python3
>
> I get the same result with python3.1.
>
> So, no, trying python3 is of no help, same errors as before.
> There's hundreds of them, but they start out
>
> $ /Library/Frameworks/Python.framework/Versions/3.1/bin/python3
> setup.py install
> running install
> running build
> running build_ext
> building 'gmpy' extension
> creating build/temp.macosx-10.3-fat-3.1
> creating build/temp.macosx-10.3-fat-3.1/src
> Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/
> MacOSX10.4u.sdk
> Please check your Xcode installation
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
> fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -I./src -I/
> opt/local/include -I/Library/Frameworks/Python.framework/Versions/3.1/
> include/python3.1 -c src/gmpy.c -o build/temp.macosx-10.3-fat-3.1/src/
> gmpy.o
> In file included from src/gmpy.c:206:
> /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
> Python.h:11:20: error: limits.h: No such file or directory
> /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
> Python.h:14:2: error: #error "Something's broken.  UCHAR_MAX should be
> defined in limits.h."
> /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
> Python.h:18:
>
> Any other ideas? Do I have to install a separate Python 3?
>

That's not a Python 3 problem. It appears to be a problem in the build script.

> Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/
> MacOSX10.4u.sdk

My guess would be you're on Snow Leopard while the original developer
is either on Tiger or Leopard. The script wants to use the 10.4 SDK
but Apple only includes the SDKs for the latest 2 versions of OS X.

>>
>>
>>
>> > --
>> >http://mail.python.org/mailman/listinfo/python-list
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
From: Mensanator on
On Dec 25, 9:25 am, Benjamin Kaplan <benjamin.kap...(a)case.edu> wrote:
> On Fri, Dec 25, 2009 at 1:48 AM, Mensanator <mensana...(a)aol.com> wrote:
> > On Dec 24, 10:18 pm, Benjamin Kaplan <benjamin.kap...(a)case.edu> wrote:
> >> On Thu, Dec 24, 2009 at 9:11 PM, Mensanator <mensana...(a)aol.com> wrote:
> >> > Ok, so I got a MacBook Air.
>
> >> > Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed.
>
> >> > So I install Xcode, download macports and download gmpy-1.11rc1.
>
> >> > Following the instructions in mac_build.txt, I do the following:
>
> >> > - sudo /opt/local/bin/port install gmp
>
> >> > This works fine.
>
> >> > Then I do
>
> >> > - python setup.py install
>
> >> > This also works (a few warnings, but nothing looked serious).
>
> >> > Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
> >> > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> >> > Type "help", "copyright", "credits" or "license" for more information.
> >> >>>> import gmpy
> >> >>>> gmpy.version()
> >> > '1.11'
>
> >> > python gmpy_test.py
> >> > Unit tests for gmpy 1.11
> >> >    on Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
> >> > [GCC 4.2.1 (Apple Inc. build 5646)]
> >> > Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
> >> > gmpy_test_cvr 151 tests, 0 failures
> >> > .
> >> > .
> >> > .
> >> >  25 tests in gmpy_test_rnd.__test__.rand
> >> > 1469 tests in 42 items.
> >> > 1469 passed and 0 failed.
> >> > Test passed.
>
> >> > Looks like a viable gmpy module for 2.6.
>
> >> > What do I do AFTER I install Python 3.1? Just running python3.1 from
> >> > the
> >> > same directory doesn't work.
>
> >> > I've spent the last 5 days trying to figure that out. I hosed it so
> >> > bad
> >> > I somehow wrecked the 2.6 version to the point where it won't even
> >> > load.
>
> >> > I just got done doing a factory restore of the entire OS to undo
> >> > everything
> >> > I did. Re-did all the above and got it back working. Haven't re-
> >> > installed 3.1
> >> > yet.
>
> >> > Anbody have any idea how to make this work?
>
> >> Did you run setup.py with python3? Python 3.1 won't install itself as
> >> the default python install for compatibility reasons so you have to
> >> run "python3 install setup.py" to install it for that version of
> >> python.
>
> > I wondered why there was both python3 and python3.1 in the bin
> > directory.
>
> > But why, when I type...
>
> > $ python3
>
> > ...do I get...
>
> > Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
> > [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
> > Type "help", "copyright", "credits" or "license" for more information.
>
> > [1]+  Stopped                 python3
>
> > I get the same result with python3.1.
>
> > So, no, trying python3 is of no help, same errors as before.
> > There's hundreds of them, but they start out
>
> > $ /Library/Frameworks/Python.framework/Versions/3.1/bin/python3
> > setup.py install
> > running install
> > running build
> > running build_ext
> > building 'gmpy' extension
> > creating build/temp.macosx-10.3-fat-3.1
> > creating build/temp.macosx-10.3-fat-3.1/src
> > Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/
> > MacOSX10.4u.sdk
> > Please check your Xcode installation
> > gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
> > fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -I./src -I/
> > opt/local/include -I/Library/Frameworks/Python.framework/Versions/3.1/
> > include/python3.1 -c src/gmpy.c -o build/temp.macosx-10.3-fat-3.1/src/
> > gmpy.o
> > In file included from src/gmpy.c:206:
> > /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
> > Python.h:11:20: error: limits.h: No such file or directory
> > /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
> > Python.h:14:2: error: #error "Something's broken.  UCHAR_MAX should be
> > defined in limits.h."
> > /Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/
> > Python.h:18:
>
> > Any other ideas? Do I have to install a separate Python 3?
>
> That's not a Python 3 problem. It appears to be a problem in the build script.
>
> > Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/
> > MacOSX10.4u.sdk
>
> My guess would be you're on Snow Leopard

Yes, this machine has OS X 10.6.

> while the original developer
> is either on Tiger or Leopard. The script wants to use the 10.4 SDK
> but Apple only includes the SDKs for the latest 2 versions of OS X.

Is there any easy way to fix the build script? Is there a hard way?
Which files comprise the build script?

Thanks for your help.

>
>
>
>
>
> >> > --
> >> >http://mail.python.org/mailman/listinfo/python-list
>
> > --
> >http://mail.python.org/mailman/listinfo/python-list