Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# cython: cdivision=True #12468

Closed
williamstein opened this issue Feb 7, 2012 · 1 comment
Closed

# cython: cdivision=True #12468

williamstein opened this issue Feb 7, 2012 · 1 comment

Comments

@williamstein
Copy link
Contributor

The file matrix_window_modn_dense.pyx starts with

# cython: cdivision=True

which suggests that putting a line like

# cython: cdivision=False

would have an impact on the directives used when compiling Cython code. This is not the case at all. Such a line is completely ignored.

To resolve this ticket, either make the directive not be ignored, or delete this line from matrix_window_modn_dense.pyx.

Note that the actual directories used are currently hard coded in devel/sage/sage/setup.py in this code:

        # call cython, abort if it failed
        cmd = "python `which cython` %s --old-style-globals --disable-function-redefinition --embed-positions --directive cdivision=True,autotestdict=False,fast_getattr=True -I%s -o %s %s"%(cplus, os.getcwd(), outfile, f)
        r = run_command(cmd)

The default with PSAGE is cdivision=False. This is causing me headaches when porting code from psage to sage. (E.g., #12465). For #12465 I'll probably try to figure out how to rewrite my code to work with cdivision=True, or use explicit cython directives on a function-by-function level.

Component: build

Issue created by migration from https://trac.sagemath.org/ticket/12468

@williamstein
Copy link
Contributor Author

comment:1

OK, now I feel stupid. So even though the command line explicitly has --directive cdivision=True,, when cython sees the file it does cdivision=False, as long as # cython: cdivision=False is in the file. So I'm basically just totally wrong. I'm closing this ticket as invalid. Sorry for the noise and confusion.

@sagetrac-mvngu sagetrac-mvngu mannequin removed this from the sage-5.0 milestone Feb 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant