Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path prefix issue on Raspberry Pi #15

Open
ralienpp opened this issue Feb 23, 2015 · 4 comments
Open

Path prefix issue on Raspberry Pi #15

ralienpp opened this issue Feb 23, 2015 · 4 comments

Comments

@ralienpp
Copy link

I attempt to use Platter on a RasPi, I stumbled upon several issues, the first one produces this output:

pi@raspberrypi ~ $ platter build test
Using package from test
Using wheel cache in /home/pi/.cache/platter
Downloading and extracting virtualenv bootstrapper
  Created scratchpad in /tmp/tmpRcLmBb-venv-tmp
  Executing pip install --download /tmp/tmpRcLmBb-venv-tmp virtualenv
    Downloading/unpacking virtualenv
    Saved /tmp/tmpRcLmBb-venv-tmp/virtualenv-12.0.7.tar.gz
    Running setup.py egg_info for package virtualenv

      warning: no previously-included files matching '*' found under directory 'docs/_templates'
      warning: no previously-included files matching '*' found under directory 'docs/_build'
    Successfully downloaded virtualenv
    Cleaning up...
Created scratchpad in /tmp/tmpzbH7YN-venv
Initializing build virtualenv in /tmp/tmpzbH7YN-venv
> /usr/local/lib/python2.7/dist-packages/platter.py(253)execute()
-> cmdline = [cmd]
(Pdb) c
  Executing /usr/bin/python /tmp/tmpRcLmBb-venv-tmp/virtualenv.py /tmp/tmpzbH7YN-venv
    /usr/bin/python: can't open file '/tmp/tmpRcLmBb-venv-tmp/virtualenv.py': [Errno 2] No such file or directory
    Error: Failed to execute command "/usr/bin/python"

Having investigated it a little bit, I understood that it attempts to use /tmp/tmpRcLmBb-venv-tmp/virtualenv.py, whereas the path that is actually formed on the system is /tmp/tmpRcLmBb-venv-tmp/virtualenv-12.0.7/virtualenv.py (in other words, there is a virtualenv-12.0.7 subdirectory).

Altering the path manually via a debugger does the trick and Platter moves on. It then fails at another point:

  Executing /tmp/tmp5XYUlZ-venv/bin/pip install wheel
    Collecting wheel
      Downloading wheel-0.24.0-py2.py3-none-any.whl (63kB)
    Installing collected packages: wheel

    Successfully installed wheel-0.24.0
Analyzing package
Invoking dummy setup to trigger requirements.
> /usr/local/lib/python2.7/dist-packages/platter.py(253)execute()
-> cmdline = [cmd]
(Pdb) c
Executing /tmp/tmp5XYUlZ-venv/bin/python setup.py --version
  Error: Failed to execute command "/tmp/tmp5XYUlZ-venv/bin/python"
> /usr/local/lib/python2.7/dist-packages/platter.py(269)execute()
-> raise click.Abort()
(Pdb) l
264                     self.log.process_stream_output(cl)
265  
266                 if cl.wait() != 0:
267                     self.log.error('Failed to execute command "%s"' % cmd)
268                     pdb.set_trace()
269  ->                 raise click.Abort()
270                 return rv
271  
272         def cleanup(self):
273             while self.scratchpads:
274                 sp = self.scratchpads.pop()
(Pdb) pp cmd
'/tmp/tmp5XYUlZ-venv/bin/python'
(Pdb) pp args
['setup.py', '--version']
(Pdb) pp os.getcwd()
'/home/pi'
(Pdb) pp cmd
'/tmp/tmp5XYUlZ-venv/bin/python'
(Pdb) pp args
['setup.py', '--version']
(Pdb) 

Remarks:

  • /tmp/tmp5XYUlZ-venv/bin/python does exist
  • there is no setup.py in the current directory, which is /home/pi
@ppawlak
Copy link
Contributor

ppawlak commented Mar 2, 2015

Same issue here.
If it matters:

  • Python 2.7.3
  • Ubuntu 12.04

Platter looks wonderful: no more git, gcc and dev libraries on my servers. I am really looking forward to make it work!

@msabramo
Copy link
Contributor

msabramo commented May 1, 2015

I am also running into the virtualenv.py': [Errno 2] No such file or directory problem with Ubuntu 14.04:

[04:02:18][create-platter-distribution]       Saved /home/teamcity/temp/buildTmp/tmp19TFbF-venv-tmp/virtualenv-12.1.1.tar.gz
[04:02:18][create-platter-distribution]     Successfully downloaded virtualenv
[04:02:18][create-platter-distribution] Created scratchpad in /home/teamcity/temp/buildTmp/tmp0Mt5Wf-venv
[04:02:18][create-platter-distribution] Initializing build virtualenv in /home/teamcity/temp/buildTmp/tmp0Mt5Wf-venv
[04:02:18][create-platter-distribution]   Executing /home/teamcity/.virtualenvs/platter/bin/python2.7 /home/teamcity/temp/buildTmp/tmp19TFbF-venv-tmp/virtualenv.py /home/teamcity/temp/buildTmp/tmp0Mt5Wf-venv
[04:02:18][create-platter-distribution]     /home/teamcity/.virtualenvs/platter/bin/python2.7: can't open file '/home/teamcity/temp/buildTmp/tmp19TFbF-venv-tmp/virtualenv.py': [Errno 2] No such file or directory
[04:02:18][create-platter-distribution]     Error: Failed to execute command "/home/teamcity/.virtualenvs/platter/bin/python2.7"
[04:02:18][create-platter-distribution] Cleaning up scratchpad in /home/teamcity/temp/buildTmp/tmp0Mt5Wf-venv
[04:02:18][create-platter-distribution] Cleaning up scratchpad in /home/teamcity/temp/buildTmp/tmp19TFbF-venv-tmp

In particular:

/home/teamcity/.virtualenvs/platter/bin/python2.7: can't open file '/home/teamcity/temp/buildTmp/tmp19TFbF-venv-tmp/virtualenv.py': [Errno 2] No such file or directory

Strangely, I got platter to work just fine on my OS X system.

@msabramo
Copy link
Contributor

msabramo commented May 1, 2015

I strongly suspect that the above problem with finding virtualenv.py has to do with the fact that on my Mac, virtualenv was being installed from a wheel (which I think platter likes), but on the Ubuntu system, it was installing virtualenv from a tarball (because it was using a private index server that didn't have the wheel) and that confuses platter. By forcing my build server to use an internal devpi server that has a wheel for virtualenv, the problem went away.

@msabramo
Copy link
Contributor

msabramo commented May 1, 2015

I wonder if #12 fixes the issue I ran into -- I'll try to find some time to try it out later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants