views:

389

answers:

3

I love the GPL as much as the next guy, but it should help to share code, not prevent to do it. I am currently in a situation where I have to provide a python free from GNU readline, which is GPL, otherwise it would turn all my python GPL, something I don't want (I'm going BSD here).

I tried to look around for both mac and linux. On mac, macports specifically compiles against GNU readline, basically meaning that everything using python from macports is tainted with GPL code. I am trying to compile a version of python without readline (e.g. by using the Apple readline), but what about linux ?

+8  A: 

BSD's editline (aka libedit) is a functional clone of readline's API. So, you should be able to replace readline with editline and just recompile the Python extension.

Again, it should 'just work', libedit's exposed functions directly match readline's .. as do other bits like version strings, etc. Even history management is the same.

In short, s/-lreadline/-ledit/ and list editline as a package dependency. A lot of systems ship with it, since a lot of BSD ports need it.

Edit:

Editline (aka Libedit) is a free library according to the GNU/FSF and Wikipedia definition. You can use it and still link against GPL libraries if you like, although the GPL prevails as the governing license if you link against GPL libraries in the same program and distribute the result.

Its an individual choice, read the licenses, not the political propaganda produced by either side.

Tim Post
s/(?=functional)/semi-/
intuited
+2  A: 

You can compile Python without readline support. You do lose the readline functionality of course.

gnibbler
A: 

Oh use double licensing BSD/GPL so anyone can choose witch license to follow!! In linux kernel they use this trick too.

przemo_li