Deluge develop minify issue when building from sdist tarball

Suggestions and discussion of future versions
Post Reply
alllexx
Member
Member
Posts: 30
Joined: Sat May 23, 2015 1:30 pm

Deluge develop minify issue when building from sdist tarball

Post by alllexx »

Hi,

I've recently upgraded deluge-develop package on Optware-ng from commit d91e5d89 to 53215d87 (currently the latest), and I've encountered this issue when trying to build from an sdist tarball:

Code: Select all

/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/bin/python2.7 setup.py build
running build
running build_webui
Traceback (most recent call last):
  File "setup.py", line 436, in <module>
    entry_points=entry_points
  File "/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 231, in run
    _build.run(self)
  File "/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 108, in run
    raise ImportError(import_error)
ImportError: No module named minify_web_js
This is how I create the tarball:

Code: Select all

(cd /home/jenkins/Optware-ng/buildroot-armeabi-ng/builds ; \
                rm -rf deluge-develop && \
                git clone https://github.com/deluge-torrent/deluge.git deluge-develop && \
                (cd deluge-develop && \
                git checkout develop && \
                git checkout `git rev-list -b develop --max-count=1 --until=2016-06-10 HEAD` && \
                /home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/bin/python2.7 minify_web_js.py deluge/ui/web/js/deluge-all && \
                /home/jenkins/Optware-ng/buildroot-armeabi-ng/host/staging/opt/bin/python2.7 setup.py sdist --formats=tar && \
                bzip2 -ck dist/deluge-*.tar > /home/jenkins/Optware-ng/buildroot-armeabi-ng/downloads/deluge-develop-20160610.tar.bz2) && \
                rm -rf deluge-develop ; \
        )
In case it may help, I've noticed that it's checking for build/lib/deluge/ui/web/js/deluge-all.js instead of deluge/ui/web/js/deluge-all.js, which is present in the tarball. As a fix for now, I'm using this patch, and deluge seems to compile fine. However, there're some runtime issues I'll report in a separate thread.

Regards,
Alex
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge develop minify issue when building from sdist tarball

Post by Cas »

Probably need to add minify_web_js.py to first line of MANIFEST.in

You don't need to run minify yourself, that is part of setup build now.
alllexx
Member
Member
Posts: 30
Joined: Sat May 23, 2015 1:30 pm

Re: Deluge develop minify issue when building from sdist tarball

Post by alllexx »

It would be nice to test for existence of minified .js during build, and skip this step, if they already exist. I see traces of this being done in setup.py, but it doesn't work properly. It doesn't make a big difference, but this way we can have tarballs that don't require python-slimit to be installed during build time.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge develop minify issue when building from sdist tarball

Post by Cas »

If you could create a ticket I'll look into it, thanks.
Post Reply