Bug 191386 - [NEW] www/py-slimit: A javascript minifier
Summary: [NEW] www/py-slimit: A javascript minifier
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: easy
Depends on:
Blocks: 191387
  Show dependency treegraph
 
Reported: 2014-06-26 06:03 UTC by Melvyn Sopacua
Modified: 2014-08-15 08:17 UTC (History)
1 user (show)

See Also:


Attachments
add-py-slimit.patch (1.67 KB, patch)
2014-06-26 06:03 UTC, Melvyn Sopacua
no flags Details | Diff
Updated patch incorporating feedback. (1.63 KB, patch)
2014-06-26 19:34 UTC, Melvyn Sopacua
no flags Details | Diff
Final submission, incorporating feedback and hooking in tests (2.75 KB, patch)
2014-08-01 20:46 UTC, Melvyn Sopacua
m.r.sopacua: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Melvyn Sopacua 2014-06-26 06:03:18 UTC
Created attachment 144137 [details]
add-py-slimit.patch

SlimIt is a JavaScript minifier written in Python. It compiles
JavaScript into more compact code so that it downloads and runs faster.

SlimIt also provides a library that includes a JavaScript parser, lexer,
pretty printer and a tree visitor.

WWW: http://slimit.readthedocs.org/

Fix:
Redports: https://redports.org/buildarchive/20140625052201-45000/
Portlint: looks fine

Note: optional dependency for django-compressor 1.4 update, which I'll be
sending shortly.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-06-26 07:30:47 UTC
Take, pending review.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-06-26 07:34:29 UTC
Review:

* Secondary (virtual) category "python" missing from CATEGORIES
* COMMENT should not contain package name or indefinite articles. See:

http://www2.au.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#makefile-comment
* Strip trailing slash from pkg-descr WWW: URL
Comment 3 Melvyn Sopacua 2014-06-26 19:34:54 UTC
Created attachment 144171 [details]
Updated patch incorporating feedback.

Didn't make a new build, the fixes are cosmetic. Did check portlint.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2014-07-07 03:11:24 UTC
Melvyn, I note in slimit's setup.py the following requirement, which is not included as a RUN_DEPENDS:

requirements = ['ply>=3.4']

Is this something you want to port before I commit this? I don't know if slimit will work without it or not.
Comment 5 Melvyn Sopacua 2014-07-07 18:41:15 UTC
You're absolutely right. I just don't know if we want ply in the ports tree. It's been unmaintained for over a year. In fact, the owner has left github. I'm enclined to drop slimit from django_compressor, since it's optional. What do you think?
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2014-07-08 05:05:44 UTC
Since you'll be the maintainer, it's your call. For context and consideration however, ply has been around for ages, is mature and was created by David Beazley, a very prominent member of the Python community. 

I also note the following PyPi download statistics, which might be indicative of how many other packages depend on it:

2203 downloads in the last day
11684 downloads in the last week
52261 downloads in the last month 

Might be worth finding out what else depends on ply that might also be valuable for others to port in order to determine its usefulness before you (we) make a final decision.

On the other hand, you can always add in slimit/ply support after the fact

Let me know how you want to progress
Comment 7 Melvyn Sopacua 2014-07-31 22:30:54 UTC
http://www.freshports.org/devel/py-ply it's already in ports.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2014-07-31 22:34:22 UTC
Can you update your patch as per comment 2 and comment 4 please :)
Comment 9 Melvyn Sopacua 2014-07-31 22:38:55 UTC
2 and 4 are in. 7 isn't. Will be tomorrow, right now I need sleep. :)
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2014-07-31 22:44:57 UTC
Latest attached patch doesn't contain COMMENT or RUN_DEPENDS changes, do you mean you have them the other changes locally?

comment 7 doesn't require a change to your patch or am I missing something?
Comment 11 Melvyn Sopacua 2014-08-01 18:34:18 UTC
Oh sorry - 4 includes the RUN_DEPENDS and so does 7. That's the one missing.

I did change the comment:
-COMMENT=       SlimIt is a JavaScript minifier written in Python
+COMMENT=       A JavaScript minifier written in Python

Ah, I see what you mean. Removing the "A ". And updating RUN_DEPENDS.
Comment 12 Melvyn Sopacua 2014-08-01 20:46:09 UTC
Created attachment 145231 [details]
Final submission, incorporating feedback and hooking in tests

Redports: https://redports.org/buildarchive/20140801201401-20249/

Tested: yes
Test result (python 2.7):
Ran 176 tests in 0.884s

OK

Changelog:

changeset:   362983:17941224f724
branch:      ports-mrs
tag:         tip
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Fri Aug 01 21:45:41 2014 +0200
files:       www/py-slimit/Makefile www/py-slimit/files/patch-setup.py
description:
Final changes:

- there are tests, hook them in
- tests reveal that there is no way to fix slimit for Python 3.x
- tests complete succesfully on Python 2.7
- patch setup.py to include the test suite


 www/py-slimit/Makefile             |  19 ++++++++++++++++++-
 www/py-slimit/files/patch-setup.py |  11 +++++++++++
 2 files changed, 29 insertions(+), 1 deletions(-)

changeset:   362982:8d097a3b8720
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Fri Aug 01 20:35:36 2014 +0200
files:       www/py-slimit/Makefile
description:
Remove the indefinite article.


 www/py-slimit/Makefile |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

changeset:   358608:4a8fd906061d
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Thu Jun 26 20:55:34 2014 +0200
files:       www/py-slimit/Makefile www/py-slimit/pkg-descr
description:
Incorporate feedback from koobs@:

* Secondary (virtual) category "python" missing from CATEGORIES
* COMMENT should not contain package name or indefinite articles.
* Strip trailing slash from pkg-descr WWW: URL


 www/py-slimit/Makefile  |  4 ++--
 www/py-slimit/pkg-descr |  2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

changeset:   358604:f4bbfda9a89a
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Wed Jun 25 00:23:40 2014 +0200
files:       www/py-slimit/Makefile www/py-slimit/distinfo www/py-slimit/pkg-descr
description:
Add py-slimit:
SlimIt is a JavaScript minifier written in Python


 www/py-slimit/Makefile  |  19 +++++++++++++++++++
 www/py-slimit/distinfo  |   2 ++
 www/py-slimit/pkg-descr |   7 +++++++
 3 files changed, 28 insertions(+), 0 deletions(-)
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2014-08-15 08:17:16 UTC
Author: koobs
Date: Thu Aug 14 08:55:28 2014
New Revision: 364839
URL: http://svnweb.freebsd.org/changeset/ports/364839
QAT: https://qat.redports.org/buildarchive/r364839/

Log:
  www/py-slimit: JavaScript minifier written in Python
  
  SlimIt is a JavaScript minifier written in Python. It compiles
  JavaScript into more compact code so that it downloads and runs faster.
  
  SlimIt also provides a library that includes a JavaScript parser, lexer,
  pretty printer and a tree visitor.
  
  WWW: http://slimit.readthedocs.org
  
  PR:		191386 (with minor changes)
  Submitted by:	Melvyn Sopacua <melvyn at magemana dot nl>

Added:
  head/www/py-slimit/
  head/www/py-slimit/Makefile   (contents, props changed)
  head/www/py-slimit/distinfo   (contents, props changed)
  head/www/py-slimit/files/
  head/www/py-slimit/files/patch-setup.py   (contents, props changed)
  head/www/py-slimit/pkg-descr   (contents, props changed)
Modified:
  head/www/Makefile