Can pip (or setuptools, distribute etc…) list the license used by each installed package?

Here is a copy-pasteable snippet which will print your packages. Requires: prettytable (pip install prettytable) Code import pkg_resources import prettytable def get_pkg_license(pkg): try: lines = pkg.get_metadata_lines(‘METADATA’) except: lines = pkg.get_metadata_lines(‘PKG-INFO’) for line in lines: if line.startswith(‘License:’): return line[9:] return ‘(Licence not found)’ def print_packages_and_licenses(): t = prettytable.PrettyTable([‘Package’, ‘License’]) for pkg in sorted(pkg_resources.working_set, key=lambda x: str(x).lower()): … Read more

Open-source: licence header on each source file OR a single COPYING OR both? [closed]

Working for a company that takes copyrights very seriously, we are required to put copyright/licence messages in every single file, despite the fact it’s not technically required under US law. I suspect it’s so that, if a file was somehow separated from the product as a whole, it would still be easily identifiable. However, we … Read more

Which open source licenses are compatible with the Apple’s iPhone and its official App Store ? [closed]

In Short/TL;DR: The LGPL and application stores have a few incompatibilities which means that you do not have the rights to distribute LGPL code on DRM-enabled AppStores or locked devices. It is best if you look for alternative implementations of the library under other laxer licenses like the Apache 2 License, the Microsoft Public License … Read more

Is there a chart of which OSS License is compatible with which? [closed]

The Free Software Foundation maintains a list of licenses, categorized as GPL compatible, GPL incompatible, and non-free. This can help answer the most common question, which is whether a license is GPL compatible. Since there aren’t many other free software licenses which require that the entire derived work be distributed under the same license like … Read more

How do you protect your software from illegal distribution? [closed]

There are many, many, many protections available. The key is: Assessing your target audience, and what they’re willing to put up with Understanding your audience’s desire to play with no pay Assessing the amount someone is willing to put forth to break your protection Applying just enough protection to prevent most people from avoiding payment, … Read more