I am trying to find how to license my open source project, but after having spent a few hours Googling around, my head started to hurt! Instead of asking a million of questions about different licenses, I will start by explaining how exactly my project is structured:
I have developed a Python application which also calls some C++ code. The C++ code is also part of the application and it is written by me. The Python part of the code only uses libraries with MIT, BSD, and Apache 2.0 licenses. The C++ part of the code makes use of a GPL library, FFTW3. If I am not mistaken, the license of FFTW3 is GPLv2. The C++ code simply #includes the FFTW3 headers, calls the FFTW3 API functions, and links to the FFTW3 libraries. The source code of my application (available on a GitHub repository), does not include the FFTW3 source code or libraries. Furthermore, a user who wants to clone and build my application from source has the option to disable all the code that is related to FFTW3, and then compile the C++ code without FFTW3 support. In other words, FFTW3 is an optional dependency when compiling from source. Finally, I also distribute my application, along with the binaries of the C++ code and the FFTW3 libraries, on PyPI.
One thing that is absolutely clear to me is that: the version of my application that is distributed via PyPI must have a GPL license as well because the Python wheel encapsulates the FFTW3 libraries.
And here is my question now: Can I use a more permissive licence (e.g., BSD/MIT/Apache) for my source code on GitHub, and at the same time use a GPLv2 license for its PyPI binary distribution?