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

Packaging AngularJS application as part of the python twisted application



Dear mentors, python hackers, Debian developers

I'm maintaining buildbot[1] packages for quite some time. While
current packaging of this application is not that hard, the upcoming
0.9 release includes a new web interface organized as python module
called 'buildbot_www'. This module is in fact an AngularJS web
application that build-depends on nodejs and npm. The current
procedure of release this module implies following steps:

1) git clone git://github.com/buildbot/buildbot
2) git checkout -tb nine origin/nine
3) cd www
4) python setup.py sdist

The last command performs the actual building of the python module:

1) npm/bower downloads necessary Javascript libraries (download 152Mb
of js libraries in .tar.gz)
2) the main (minified/uglified) Javascript file is generated
3) other js/css resources are generated using tools like coffeescript and less
4) html files are generated as well

In the end these files are included in the resulting python module
tarball. It is totally valid python sdist tarball that can be packaged
using ordinary rules of Python packaging. But according to the Debian
policy this tarball cannot be considered as a source tarball since it
contains generated code, minified js/css etc.

I have raised the discussion on the upstream mailing list[2]. Their
intention is understandable: current approach allows python developers
to work on python code whithout bothering with nodejs/npm while
frontend devs could easily hack web iterface without need of python
backend.

Thanks to the conversation on IRC with Ben Finney, I've detected some
potential ideas that should be addressed upstream:

1) provide valid (from Debian's PoV) source tarball for buildbot_www
Python module
2) have separate source tarball with bundled javascript dependencies
that can be handled by DebSrc 3.0 format as additional upstream
tarball; also make possible to use this external tarball in the build
process without need of internet connection, It would be possible to
replace external js deps with ones already packaged for Debian as
well, for example.

What steps can be done in such case? What can be done better? Please
share your thoughts. I believe, there would appear more similar
projects in the future, so the conversation should be useful for a lot
more people.

Thanks.

[1]: http://buildbot.net
[2]: http://thread.gmane.org/gmane.comp.python.buildbot.devel/9744

-- 
Best regards, Andriy Senkovych


Reply to: