Figure out a way to package LESS in friendlier manner

Bug #1020799 reported by Gabriel Hurley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Won't Fix
Wishlist
Gabriel Hurley

Bug Description

The way we're packaging LESS right now (in the /bin dir) doesn't make us a great citizen towards downstream packagers.

In an ideal world, the lessc script would be installed as a standard script and be moved to the platform's scripts dir (e.g. /usr/local/bin). This can be easily accomplished by listing it as a script in setup.py. However, the path to the related .js files is hardcoded into the lessc file and assumes that they are in the top level of the adjacent "lib" directory. Forcing setuptools/distutils to place those files there is beyond the scope of my knowledge.

If we can solve that bit, then the path to the lessc binary in settings.py can then be written as a check for the file at the expected path with a fallback to the output of "which lessc" on the shell.

Either way, the current method of just shoving horizon's "bin" directory into the package isn't very friendly and will probably need to be fixed before the final Folsom release.

That said, I defer to actual downstream packagers to shed more light on the situation. I know just enough about packaging to get by.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/9309

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/9309
Committed: http://github.com/openstack/horizon/commit/df106572ccedb6f1fe578018dddad9cb3f3e1800
Submitter: Jenkins
Branch: master

commit df106572ccedb6f1fe578018dddad9cb3f3e1800
Author: Gabriel Hurley <email address hidden>
Date: Tue Jul 3 20:46:40 2012 -0700

    Includes LESS files in bdist packages.

    Incidentally cleans up some files that didn't exist in the
    MANIFEST.in file.

    Fixes bug 1016085 but now needs to be followed by a fix for
    bug 1020799 in the future.

    Change-Id: I8a53bb17f14afdad61513afa67de7134722c49e9

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
status: Fix Committed → Confirmed
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

I'm gonna defer this until a downstream packager actually says that it's affecting them... Id' rather work with the people that this affects to get it solved.

Changed in horizon:
milestone: folsom-3 → none
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Since the distros seem to have been okay with this for the Folsom release, I'm going to assume it'not as much of an issue as I'd thought it might be.

Lowering in priority until such time as it is proven to matter.

Changed in horizon:
importance: High → Wishlist
Revision history for this message
Matthias Runge (mrunge) wrote :

Just a short feedback:

For Fedora and also for EPEL, we got node.js, and also less.js included as package about a week ago. I'd appreciate to drop the contents of the bin directory completely, as it bundles less.js into horizon.

Dependencies should be IMHO handled through package managers.

Changed in horizon:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.