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

extra_compile_args don't get passed through on Windows/MSVC #2605

Open
MaxBareiss opened this Issue Sep 13, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@MaxBareiss

MaxBareiss commented Sep 13, 2018

I am trying to compile a Cython extension for Python 3.6.3 on Windows using MSVC v.1900 (Visual Studio 2017) and cython 0.28.2. This is my setup.py script:

from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy as np
import os

ext_modules = [
    Extension(
        "file_1",
        "folder/file_1.pyx",
        extra_compile_args=['/DEBUG']
    ),
    Extension(
        "file_2",
        "folder/file_2.pyx",
        extra_compile_args=['/DEBUG']
    )
]

setup(ext_modules=cythonize(ext_modules, annotate=True, gdb_debug=True),
      include_dirs=[np.get_include(), '.'],
      zip_safe=False)

The actual executed compilation command doesn't include the /DEBUG option. Also, the gdb_debug option for cythonize doesn't work. Is there a better way to do this?

@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Sep 20, 2018

Contributor

gdb_debug is gdb specific and doesn't work on Windows.

The rest looks like it should work, but those are distutils options. Worth looking over there how they are handled. Could also be related to the setuptools usage.

Contributor

scoder commented Sep 20, 2018

gdb_debug is gdb specific and doesn't work on Windows.

The rest looks like it should work, but those are distutils options. Worth looking over there how they are handled. Could also be related to the setuptools usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment