No docs for setup.cfg syntax for compiled extensions
Bug #1510898 reported by
Florian Wilhelm
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Confirmed
|
Medium
|
Unassigned |
Bug Description
By looking in the source code of pbr/util.py it seems to be possible to define extensions in setup.cfg with following syntax:
[extension:
sources=
include_dirs=
define_macros=
undef_macros=
library_dirs=
libraries=
runtime_
extra_objects=
extra_compile_args=
extra_link_args=
export_symbols=
swig_opts=
depends=
But this is not mentioned in the official documentation! Could this be added? Also how would one use dynamic generation of these options like when an extensions depends on numpy, you fairly often see:
include_dirs = [numpy.
Is this also possible inside setup.cfg? If not one should also support it.
Changed in pbr: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
To post a comment you must log in.
Has there been any progress on this.
I am looking to build a pytorch based module that requires building some cpp_extensions.
The build process works flawlessly if I use setup tools but when i use pbr there are linker errors.
My setup files looks as follows.
``` requires= ['pbr'] ,
cpp_extension. CppExtension(
'myextensi on',
[' file1.cpp' , 'file2.cpp'] {'build_ ext': cpp_extension. BuildExtension} ,
setup(
setup_
pbr=True,
ext_modules=[
)],
cmdclass=
)
```
Ofcourse ideally the ext_modules should be inside cfg file but as OP pointed out, it is not clear how i would use custom include dirs like `include_ dirs=cpp_ extension. include_ paths() `.