[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MIT/Expat with "The Software shall be used for Good, not Evil" statement



On Thu, Apr 26, 2012 at 12:03:37PM +0100, Simon McVittie wrote:
> This situation is a bit confusing because it sounds as though there
> are two files involved, both called "jsmin": "the library" is a
> translation of the original jsmin non-Python library into Python
> ("Good, not Evil" license inherited from the original jsmin non-Python
> library), and "the wrapper" wraps it in a common API (Expat license).
> Is this the case? If so, you must not distribute "the library" but I
> think it's OK to distribute "the wrapper".

Yes. Currently upstream tarball contains only "import jsmin" in wrapper
and outdated LICENSE file.

I'm going to distribute something like this:

--- django-pipeline-1.2.2/pipeline/compressors/jsmin.py.orig	2012-03-11 13:04:10.000000000 +0200
+++ django-pipeline-1.2.2/pipeline/compressors/jsmin.py	2012-04-26 13:59:52.749301910 +0300
@@ -7,5 +7,9 @@
     (http://pypi.python.org/pypi/jsmin/).
     """
     def compress_js(self, js):
-        from jsmin import jsmin
-        return jsmin(js)
+        try:
+            from jsmin import jsmin
+            return jsmin(js)
+        except ImportError:
+            # JSMin is not available
+            return js

So it should be ok to distribute such package.. Thanks

-- 
WBR, Dmitry

Attachment: signature.asc
Description: Digital signature


Reply to: