Skip to content

Documentation example doesn't work #3069

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

Open
realead opened this issue Aug 4, 2019 · 5 comments · May be fixed by #4656
Open

Documentation example doesn't work #3069

realead opened this issue Aug 4, 2019 · 5 comments · May be fixed by #4656

Comments

@realead
Copy link
Contributor

realead commented Aug 4, 2019

The documentation example from http://docs.cython.org/en/latest/src/userguide/wrapping_CPlusPlus.html#specify-c-language-in-setup-py

from distutils.core import setup
from Cython.Build import cythonize

setup(ext_modules = cythonize(
           "rect.pyx",                 # our Cython source
           sources=["Rectangle.cpp"],  # additional source file(s)
           language="c++",             # generate C++ code
      ))

throws error with 0.29.12:

ValueError: got unknown compilation option, please remove: sources

If this to be believed (fginter/dep_search#13), it doesn't work since 0.26.

@sambhavnoobcoder
Copy link

can i work on this issue ?

@scoder
Copy link
Contributor

scoder commented Aug 23, 2023

can i work on this issue ?

Sure. We probably need to instantiate an Extension object here, as done in other examples, and pass the sources into that. It's also worth using setuptools instead of distutils here. Try out what works for the example and then change the documentation accordingly.

@AMMAR-62
Copy link

someone working on this issue??

@XiangyuTan-learning
Copy link

Can I working on this as my first issue? Thanks

@da-woods
Copy link
Contributor

Yes go for it

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

Successfully merging a pull request may close this issue.

6 participants