On Mon, Apr 20, 2020 at 7:37 PM Christopher Barker <pythonchb@gmail.com> wrote:
On Sun, Apr 19, 2020 at 3:37 AM Alex Hall <alex.mojaki@gmail.com> wrote:
```
File "setup.py", line 2232
        self.add(Extension('_decimal',
                           include_dirs=include_dirs,
                           libraries=libraries,
                           define_macros=define_macros,
                           undef_macros=undef_macros,
                           extra_compile_args=extra_compile_args,
                           sources=sources,
                           depends=depends))

I don't know about all the other examples, but in a setup.py that cries out for a more declarative approach: put all that in a dict, and call Extension('_decimal', **build_params).

Do you mean essentially writing something like:

        build_params = dict(
            include_dirs=include_dirs,
            libraries=libraries,
            define_macros=define_macros,
            undef_macros=undef_macros,
            extra_compile_args=extra_compile_args,
            sources=sources,
            depends=depends
        )
        self.add(Extension('_decimal', **build_params)

or something more than that? I'm looking at the file and I can't see what else could be done, and the above just seems detrimental.