Honor CXXFLAGS when building python module #346

Open
opened 2026-01-29 20:42:23 +00:00 by claunia · 0 comments
Owner

Originally created by @ryandesign on GitHub (Oct 6, 2020).

Hi. Parts of the brotli python module are written in C++. When compiling that part, the contents of environment variable CXXFLAGS should be passed to the compiler. setuptools does not support modules written in C++ so you have to hack in support manually (or help the setuptools folks fix it on their end, if you're able).

My preliminary fix is here:

b21a2cbb0d/python/py-brotli/files/CXXFLAGS.patch

It may not be fully correct but it was good enough for me on macOS.

Originally created by @ryandesign on GitHub (Oct 6, 2020). Hi. Parts of the brotli python module are written in C++. When compiling that part, the contents of environment variable CXXFLAGS should be passed to the compiler. [setuptools does not support modules written in C++](https://github.com/pypa/setuptools/issues/1192) so you have to hack in support manually (or help the setuptools folks fix it on their end, if you're able). My preliminary fix is here: https://github.com/macports/macports-ports/blob/b21a2cbb0d663da9c8c138f8e9346ad1794cf4f3/python/py-brotli/files/CXXFLAGS.patch It may not be fully correct but it was good enough for me on macOS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#346