I'm in a situation a bit similar to this one, but more precisely I developed a Python package with multiple modules. Some of them have dependencies under GPL, therefore "infecting" this specific submodule to be under the GPL. However it is possible to specify a different license in each module, so I can put specific license files into each folder.
Now my setup.py
would have e.g. two modules:
# Extract of setup.py
setup(
name="mypkg",
packages=["moduleGPL", "moduleBSD"],
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: OSI Approved :: BSD License"
]
# additional setup parameters
)
- Is this formulation allowed? GPL is incompatible with BSD, but the GPL module can be interpreted as optional in my use case, so I believe this would be legit.
- Does the setup.py acts as a declaration of licensing? Because if not it's more convenient and I can declare the licenses explicitly in the README without trouble.
P.S.: I'm anyway releasing my package as open source for non commercial use, so it does not have much practical consequences, however I feel frustrated to be "obliged" to put restrictions on my code reuse, simply because of import statements... (realised that too late, I know)