Am Montag, 15. Juni 2015 00:11:02 UTC+2 schrieb David Roe:
>
>
>
> On Sun, Jun 14, 2015 at 9:43 AM, 'Martin R' via sage-devel <
> [email protected] <javascript:>> wrote:
>
>> I have now made a minimal non-working example, using one approach that
>> would look sensibel to me.
>>
>> It fails doing the assignment self._codomain = C in Map.__init__, which
>> is something I do not understand.
>>
>
> The reason it fails is that _codomain is cdef Parent in map.pxd. You
> could change this to CategoryObject, though there may be some other
> consequences.
>
Turns out that this doesn't work at all. Importing CategoryObject instead
of Parent, and declaring _codomain as CategoryObject, then sage -b yields:
Cythonizing sage/categories/action.pyx
Error compiling Cython file:
------------------------------------------------------------
...
cpdef Element _call_(self, x)
cpdef Element _call_with_args(self, x, args=*, kwds=*)
cdef public domain # will be either a weakref or a constant map
cdef public codomain # will be a constant map
cdef CategoryObject _codomain # for accessing the codomain directly
^
------------------------------------------------------------
sage/categories/map.pxd:17:9: 'CategoryObject' is not a type identifier
Traceback (most recent call last):
File
"/home/martin/sage/local/lib/python2.7/site-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Build/Dependencies.py",
line 1003, in cythonize_one_helper
return cythonize_one(*m[1:])
File
"/home/martin/sage/local/lib/python2.7/site-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Build/Dependencies.py",
line 985, in cythonize_one
raise CompileError(None, pyx_file)
CompileError: sage/categories/action.pyx
Cythonizing sage/categories/map.pyx
Traceback (most recent call last):
File "setup.py", line 562, in <module>
run_cythonize()
File "setup.py", line 554, in run_cythonize
'profile': profile,
File
"/home/martin/sage/local/lib/python2.7/site-packages/Cython-0.22-py2.7-linux-x86_64.egg/Cython/Build/Dependencies.py",
line 856, in cythonize
result.get(99999) # seconds
File "/home/martin/sage/local/lib/python/multiprocessing/pool.py", line
558, in get
raise self._value
Cython.Compiler.Errors.CompileError: sage/categories/action.pyx
Makefile:9: recipe for target 'sage' failed
make[1]: *** [sage] Error 1
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.