Comment 1 for bug 1648039

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1648039] [NEW] Swig isn't executed with snapcraft python plugin

El 07/12/16 a las 07:33, Didier Roche escribió:
> Public bug reported:
>
> 1. Use a project having a swift module:
> requirements.txt:
> https://github.com/didrocks/python-midi/archive/v0.2.3+2016.11.tar.gz
>
> 2. Use the python plugin in your snapcraft.yaml:
> parts:
> foo:
> source: .
> plugin: python
> python-version: python2
> requirements: requirements.txt
> build-packages: [swig3.0]
>
> After snapcrafting this parts (not a cleanbuild, so swig is available on the system), you will notice that the .so file is compiled:
> parts/foo/install/lib/python2.7/site-packages/midi/sequencer/_sequencer_alsa.so
> But you don't have the binding generated by swift, "sequencer_alsa.py".
>
> On the same machine, I can create a virtualenv and then get the module compiles:
> $ virtualenv venv
> $ . venv/bin/active
> $ pip install --r requirements.txt
> -> venv/lib/python2.7/site-packages/midi/sequencer/sequencer_alsa.py was generated
>
> As a quick try, I tried removing "--no-compile" in pip_install() in the
> python plugin, without success. Nothing in the verbose pip outputs
> explains why swig isn't ran.

We will have to look at the source code for venv/virtualenv and pip to
figure this one out (which is what I did to get most of the new plugin
code).