Skip to content

Commit

Permalink
vendor: remove cpp_str and tags after usage
Browse files Browse the repository at this point in the history
This will prevent this type of warning:

.sx/stupeflix/lib/python3.10/site-packages/setuptools/_distutils/extension.py:134:
 UserWarning: Unknown Extension options: 'cpp_std', 'tags' warnings.warn(msg)

It's wrong to forward the keyword 'cpp_std' and 'tags' to
cython.Extension and the latter is used to fill the
extra_compile_args in:

https://github.com/gopro/cython-setuptools/blob/main/cython_setuptools/vendor.py#L295-L296
  • Loading branch information
mtreglia-gpsw committed Feb 28, 2024
1 parent 8a6ec6d commit a1f7572
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cython_setuptools/vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ def create_cython_ext_modules(cython_modules, profile_cython=False, debug=False)
args = kwargs.setdefault(args_name, [])
if "-g" not in args:
args.append("-g")
# Remove custom cython_setuptools options
if "cpp_std" in kwargs:
del kwargs["cpp_std"]
if "tags" in kwargs:
del kwargs["tags"]
ext = Extension(**kwargs)
ret.append(ext)
return ret
Expand Down

0 comments on commit a1f7572

Please sign in to comment.