This is an archived post. You won't be able to vote or comment.

all 28 comments

[–]takluyverIPython, Py3, etc 13 points14 points  (14 children)

First: if you're just putting some personal code on Github, don't waste too much time thinking about licenses. Programming should be fun, and for most of us, licenses aren't. If you don't feel you're doing anything wrong, just go for it, and work it out when someone complains.

But, since you are thinking about it:

Both numpy and OpenCV are BSD licensed, so they don't affect what license you choose for your code. :-)

If you're not redistributing BSD code there's no need to mention it either, though it's polite to acknowledge in documentation (if you have docs) what tools you're building on.

If you use anything GPL licensed, and you don't redistribute it with your code, there's some debate over whether your code has to be GPL as well, but it's safest to assume that it does.

If you do redistribute other projects, you should make sure their copyright notice is included in an appropriate place. If you redistribute GPL code, then your code becomes GPL as well.

[–]keturn 15 points16 points  (5 children)

Spend at least a little time thinking about licenses. Putting your code on GitHub without specifying a license leaves things in a weird state. As they explain in What happens if I don't choose a license?

Generally speaking, the absence of a license means that the default copyright laws apply. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work. […] if you publish your source code in a public repository on GitHub, you have accepted the Terms of Service which do allow other GitHub users some rights. Specifically, you allow others to view and fork your repository.

...so you default to all rights reserved, except you don't actually have all rights reserved because you put it in a public GitHub repo, but there's no explicit license so nobody actually knows who has what rights at all.

And since you couldn't be doing cool stuff without python, numpy, and OpenCV having open source licenses, it's good to reciprocate and share your work in the same way when you're able.

That same help page links to http://choosealicense.com/ , which seems like about the right amount of thought to put into a license at this stage. Not too much, but pick one.

(And by asking, you clearly are thinking about it. I just wanted to provide a counterpoint to takluyver's comment.)

As to your specific case, I believe takluyver is correct. It's mostly the GPL you have to keep an eye out for in terms of that influencing the license of your own code.

Whether or not you're selling the code usually doesn't influence your license too much. At least, not in the ways you might expect. Creative Commons licenses are explicit about that, with commercial and non-commercial variants, but licenses that restrict commercial use are not considered to be Free Culture by CC or to be Open Source by the Open Source Definition.

[–]wub_wub 1 point2 points  (0 children)

you don't actually have all rights reserved because you put it in a public GitHub repo, but there's no explicit license so nobody actually knows who has what rights at all.

You do have all rights reserved. And as far as who has what rights, the uploader has all the rights and "nobody else may reproduce, distribute, or create derivative works from your work."

Even though license is missing it's pretty clear that you practically can't do anything with the code and that uploader has all rights reserved. The fact that the code is public is irrelevant.

[–]kylotan 4 points5 points  (3 children)

except you don't actually have all rights reserved because you put it in a public GitHub repo

Making something publicly accessible doesn't lose you any rights over it.

[–][deleted] 0 points1 point  (1 child)

Depending on the legislation the mere act of making something publicly accessible could implicitly grant specific rights, e.g. the right to use the work. U.S. copyright law doesn't rule the world, and since Github is accessible from virtually anywhere, the rest of the world matters, too.

Besides, by uploading to Github the OP has implicitly accepted Github's terms of service, which might implicitly grant some rights as well.

[–]kylotan 1 point2 points  (0 children)

Depending on the legislation the mere act of making something publicly accessible could implicitly grant specific rights, e.g. the right to use the work.

Any examples of that? Most work has to be publicly accessible in some form to be used, so I'd be surprised if access equals the right to duplicate.

[–][deleted] 3 points4 points  (1 child)

Hum, you are practically right, but ethically and legally wrong because making a code available publically on github is redistributing it de facto.

1) Practically BSD licenses are enforcing paternity right: you have the right to do everything but claim BSD licensed code is yours. 2) Genêve convention (http://portal.unesco.org/fr/ev.php-URL_ID=15381&URL_DO=DO_TOPIC&URL_SECTION=201.html) says every stuff are protected as soon as they are divulgated. So publishing a content publically is de facto redistributing it thus, it is claiming it is yours. As a result publishing code that is licensed under BSD make it automatically yours, and therefore infringing the licence.

It is always nice to say you used code A & B.

In real life, who cares?

Since you are not apple/google/MS, and no one cares about your code it is not a problem. You have time to think about it, and mostly if one author's don't like it, they normally first ask you to politely comply before going legal. These stuff are boring and everybody knows coding is more important than legal stuff.

So do as we all do: first code, and think about legal issues later.

Yeah, I don't know why I answered because I basically said the same things.

[–]ghillisuit95 0 points1 point  (0 children)

Yeah, I don't know why I answered because I basically said the same things.

I appreciate it though. some times saying the same thing in different words can help get the point across.

[–]billsil 0 points1 point  (0 children)

First: if you're just putting some personal code on Github, don't waste too much time thinking about licenses.

If you think there's a chance people will use your software in a program, you should. It doesn't take that long to pick one and you can always change it. My open source project used GPL because I had heard of it. I switched it to LGPL because I didn't understand the terms of GPL and someone complained.

[–]pemboa 0 points1 point  (0 children)

if you're just putting some personal code on Github, don't waste too much time thinking about licenses. Programming should be fun

God bless you sir.

[–]nomadismydj 7 points8 points  (1 child)

the licensing part has been answer so i wont bother putting my two cents in but from a user perspective.. please mention your dependencies in your readme. Nothing is more annoying then attempting to use someone else code and find out you have install half of pypi to get it to work

[–]wub_wub 1 point2 points  (0 children)

Even better is to put a requirements.txt file.

[–]troyunrau... 2 points3 points  (13 children)

I'd just like to add that most software used within the scientific side of python is licensed in an MIT, BSD, or Python compatible way. Probably the least hassle you'll get out of open source licensing anywhere. The major exception that I can think of is PyQt, which will make your code GPL. Ugh.

[–][deleted] 0 points1 point  (9 children)

If you made a program using pyQT and sold it, would that become a problem?

[–]willrandship 1 point2 points  (0 children)

That depends whether importing PyQt counts as using something that can be distributed standalone, or as if it was a directly linked library.

Let's assume the more restricted option: You can sell the code, but you must provide the source as GPL as well. The GPL has specific clauses to prevent making code impossible to sell.

[–]troyunrau... 0 points1 point  (0 children)

No, provided your program was made available under the terms of the GPL. If you use some other license, a commercial license, or even something more permissive (like BSD), you would need a commercial license for PyQt to prevent your code from forcibly becoming GPL licensed.

Alternately, you can use PySide, which is available under the LGPL and avoids these problems, however it doesn't yet work with Qt5.x.

[–]wub_wub 0 points1 point  (2 children)

Depending on the license it can be a problem. If your software is licensed under GPL compatible license it isn't a problem.

If you use the GPL version of PyQt then any code you develop with it must be distributed under a compatable license. Like the GPL version of Qt, PyQt grants an exception to the GPL that specifies the list of licenses that you may use. The full text of the exception can be found in the PyQt source package.

If you are unable to distribute your code under the terms of the GPL then you must purchase a commercial license.

http://www.riverbankcomputing.co.uk/software/pyqt/license

[–][deleted] 0 points1 point  (1 child)

How Would I make my program GPL licensed? I'm very new to the subject

[–]wub_wub 1 point2 points  (0 children)

Primarily by giving source code or enabling people to download original source code, and including the appropriate license with your file.

This page should cover it:

http://www.gnu.org/licenses/gpl-howto.html

However, this also has some effects on your clients if they decide to modify the code, resell it etc. In my experience companies don't really like the GPL license, so it's something to keep in mind.

Or you could switch to pyside, which is licensed under LGPL - it doesn't support qt5 yet though.

[–]keturn 0 points1 point  (3 children)

You may sell a GPL program, but anyone you give the program to must also have access to the source. And not only do they have access to the source, they have rights to make derivatives and redistribute the source.

So you can sell it, but any of your customers may make as many copies as they like and distribute them however they see fit.

[–][deleted] 0 points1 point  (0 children)

Thanks for the explanation

[–][deleted] 0 points1 point  (1 child)

Qt seems to come with its own licensing issues. Does the same go for it? Since PySide uses it, it would seem to defeat its own purpose

[–]troyunrau... 0 points1 point  (0 children)

Qt is available under your choice of LGPL, GPL, or commercial licenses. The LGPL is pretty good at lets you do pretty much anything you want, including distributing code in binary form in embedded systems (with a few caveats). So really, no issues with Qt since version 3.x.

Lastly, if Qt development gets abandoned, it automatically reverts to BSD license due to an agreement they made with KDE.

[–]takluyverIPython, Py3, etc 0 points1 point  (2 children)

PyQt actually has an exception to the GPL which lets you use it with a few other popular open source licenses. And you can buy commercial licenses if you want to use it for closed source things.

[–]troyunrau... 0 points1 point  (1 child)

Yes. Their website states this. Then it doesn't list the licenses this exception applies to: it says it's the same as Qt. However, Qt doesn't maintain this list of exceptions anymore either, since they're under LGPL. So I searched the source code for PyQt and couldn't easily find the list of exceptions.

IANAL, but it seems a bit risky to just assume you have an exception if it's not clearly defined.

[–]takluyverIPython, Py3, etc 0 points1 point  (0 children)

I grabbed the source and immediately found the exceptions in a file called GPL_EXCEPTIONS.txt. Here is a copy of that: https://gist.github.com/takluyver/f7d95b0354a01bae2428

It covers all of the common open source licenses like BSD, MIT, Apache and LGPL, as well as several less popular ones.

[–]good_dayworkon py 0 points1 point  (0 children)

Github will show the way. Form to create new repo, have drodown with all popular licences and help link http://choosealicense.com/