diff --git a/setup.py b/setup.py index d69cab31..97f04b72 100644 --- a/setup.py +++ b/setup.py @@ -198,6 +198,12 @@ class psycopg_build_ext(build_ext): self.libraries.append('ssl') self.libraries.append('crypto') + def finalize_linux2(self): + """Finalize build system configuration on GNU/Linux platform.""" + # tell piro that GCC is fine and dandy, but not so MS compilers + for ext in self.extensions: + ext.extra_compile_args.append('-Wdeclaration-after-statement') + def finalize_options(self): """Complete the build system configuation.""" build_ext.finalize_options(self)