Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsmin.py in LICENSE is probably outdated #99

Closed
dionorgua opened this issue Apr 26, 2012 · 9 comments
Closed

jsmin.py in LICENSE is probably outdated #99

dionorgua opened this issue Apr 26, 2012 · 9 comments

Comments

@dionorgua
Copy link

Hi,

I know that jsmin itself is distributed under MIT with "for good not evil" clause. But does same apply to "pipeline/compressors/jsmin.py"? It's just wrapper script around it.

It pretty looks like this file was initially copied from original jsmin and later replaced with reference to separate python module. If it's so, could you please update LICENSE file? Now it looks like your jsmin.py wrapper is licensed under this modified license. Maybe just some note that "this package requires JSMin that is distributed under special license".

Also would you accept patch that makes jsmin usage optional? For example add try/catch around import and fallback to "return original JS".

I'm trying to package django-pipeline to debian. And due to this "for good not evil" statement, package should be placed to non-free section of archive.. So I'm looking to some solution how to workaround it.

Thanks

@cyberdelia
Copy link
Member

If you are trying to package recent version (>=1.2), jsmin is no more bundle, see : https://github.com/cyberdelia/django-pipeline/blob/master/pipeline/compressors/jsmin.py

If will update LICENSE to reflect that change too, thanks for the report.

@cyberdelia
Copy link
Member

This is fixed in 808a07a.
Do you want me to release a new version ?

@dionorgua
Copy link
Author

Hi. It's not needed ASAP. But it'll be cool if you can release some "bugfix" version. Btw what is the best way to get official tarball?

I'm using http://pypi.python.org/pypi/django-pipeline/ for this.

@dionorgua
Copy link
Author

btw you've some typo in LICENSE now. Looks like you've removed some lines incorrectly

@cyberdelia
Copy link
Member

Ahahah, dammit. Fixed.

@cyberdelia
Copy link
Member

For tarball, pypi is fine or github with tags.

@dionorgua
Copy link
Author

Thanks. Anyway I need to deal with jsmin somehow. So probably I'll try to use followed patch in Debian:

--- 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

Another solution is to remove jsmin at all, but this introduce API incompatibility...

@cyberdelia
Copy link
Member

I don't think this is a problem, since jsmin is not the default compressor, it's yui-compressor.

@dionorgua
Copy link
Author

Cool. Thanks. So looking forward to see release with fixed LICENSE :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants