videlec / pypolymake

Python wrappers for polymake
https://pypi.python.org/pypi/pypolymake
3 stars 5 forks source link

number.pyx:108:25: Invalid operand type for '-' (pm_Integer) #6

Closed mkoeppe closed 8 years ago

mkoeppe commented 8 years ago

I'm getting this from sage -f pypolymake:

[pypolymake]   Downloading pypolymake-0.1b4.tar.gz
...
[pypolymake]     cythoning src/polymake/number.pyx to src/polymake/number.cpp
[pypolymake] 
[pypolymake]     Error compiling Cython file:
[pypolymake]     ------------------------------------------------------------
[pypolymake]     ...
[pypolymake]         def __sub__(self, other):
[pypolymake]             cdef Integer ans = Integer.__new__(Integer)
[pypolymake]             if type(self) is type(other):
[pypolymake]                 ans.pm_obj = (<Integer>self).pm_obj - (<Integer>other).pm_obj
[pypolymake]             elif isinstance(self, int):
[pypolymake]                 ans.pm_obj = -((<Integer>other).pm_obj - <long>self)
[pypolymake]                             ^
[pypolymake]     ------------------------------------------------------------
[pypolymake] 
[pypolymake]     src/polymake/number.pyx:108:25: Invalid operand type for '-' (pm_Integer)
videlec commented 8 years ago

Right. It seems that Cython 0.23.4 and Cython 0.24.1 do not react the same...

videlec commented 8 years ago

Normally fixed with 54efab0. Could you confirm?

mkoeppe commented 8 years ago

Yes, the lastest on master cis ompiling now. Thanks! Strangely, at the end of

sage -sh -c 'LDFLAGS="-L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/ $LDFLAGS" pip install --ignore-installed --no-deps --no-index .'

it reports

Successfully installed pypolymake-0.1b2

Not sure where it's getting that version number from.

videlec commented 8 years ago

Thanks for the report.