MolSSI-BSE / basis_set_exchange

A repository for quantum chemistry basis sets
https://molssi-bse.github.io/basis_set_exchange/
BSD 3-Clause "New" or "Revised" License
151 stars 44 forks source link

unidecode and GPL? #309

Open oliver-s-lee opened 2 months ago

oliver-s-lee commented 2 months ago

Hi folks, thank for the nice library! I think I've found a GPL issue in the code that I wanted to check with you:

basis_set_exchange/writers/molcas_library.py imports unidecode on line 6. Sadly, the unidecode library is only available under the GPL license (assuming it's this library). Because the basis_set_exchange library is not licensed under the GPL, afaik you cannot use the unidecode library.

As an alternative, text-unidecode looks like it does a similar job and is available under a more permissive license, it might work as a drop-in replacement.

Apologies if this has already been brought up and resolved elsewhere.

bennybp commented 2 months ago

This is a tricky issue. As far as I am aware, the question of whether or not importing a library constitutes a "derived work" (and therefore triggers GPL's requirements) is not settled law. There is no court case that I have been able to find that states one way or the other, but plenty of opinions on both sides.

Either way, unidecode is used in so few places, it may make sense to see if we can remove it entirely. It seems to be used in printing some output for molcas, which means molcas may only support ASCII.

Something in the python standard library might work: https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize

oliver-s-lee commented 2 months ago

Yeah that's a good point. From my somewhat limited reading it was my understanding that any type of dynamic library linking constitutes a "derived work" in the eyes of the GNU, which I suppose is all that matters from a moral standpoint (even if whether that's defendable legally remains to be seen).

Either way, the easiest thing is to probably replace the library to be safe, as you say.

Also possibly of interest to anyone else that comes across this, the conda-forge build of basis_set_exchange v0.9 doesn't seem to include unidecode as a dependency (even though the import in molcas_library.py remains). Downgrading from 0.10 to 0.9 is a useful way of installing only the exchange without unidecode (although presumably the molcas_library.py module will not function).