luking-dev / webiopi

Automatically exported from code.google.com/p/webiopi
0 stars 0 forks source link

Linux Arch support #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the webiopi module (in Arch ARM, it ends up in 
/usr/lib/python2.7/site-packages/_webiopi)
2. Run `python2.7 -m webiopi 8000'
3. This results in an ImportError: No module named _webiopi.GPIO (traceback 
shown at the bottom)

This can be fixed by adding a blank __init__.py file to the _webiopi module

===

WebIOPi version used?
=> 0.5.3

Python version used?
=> 2.7

Distro used? (WebIOPi has only been tested on Raspbian Wheezy)
=> Arch ARM

Raspberry Pi board revision? (1 or 2)
=> 2

For Javascript side bugs, Browser?
=> Firefox

Please provide any additional information below.

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/webiopi.py", line 32, in <module>
    import _webiopi.GPIO as GPIO
ImportError: No module named _webiopi.GPIO

Original issue reported on code.google.com by timothy....@gmail.com on 4 Mar 2013 at 7:04

GoogleCodeExporter commented 9 years ago
How did you installed WebIOPi ?

__init__.py is well created under Raspbian : 

pi@raspberrypi ~ $ ls 
/usr/local/lib/python2.7/dist-packages/WebIOPi-0.5.3-py2.7-linux-armv6l.egg/_web
iopi
GPIO.py  GPIO.pyc  GPIO.so  __init__.py  __init__.pyc

Original comment by tro...@trouch.com on 4 Mar 2013 at 7:59

GoogleCodeExporter commented 9 years ago
The module itself is installed via:

python2 setup.py build
python2 setup.py install --root="$pkgdir"

($pkgdir is just a staging area that all Arch builds use. Things are built to 
the predefined pkg dir instead of directly to the filesystem.)

The whole build file can be seen here for reference:
https://aur.archlinux.org/packages/py/python2-webiopi/PKGBUILD

Original comment by timothy....@gmail.com on 4 Mar 2013 at 8:17

GoogleCodeExporter commented 9 years ago
This is the resulting tree from the above setup.py commands

python2.7
└── site-packages
    ├── WebIOPi-0.5.3-py2.7.egg-info
    │   ├── PKG-INFO
    │   ├── SOURCES.txt
    │   ├── dependency_links.txt
    │   └── top_level.txt
    ├── _webiopi
    │   └── GPIO.so
    ├── webiopi.py
    └── webiopi.pyc

Original comment by timothy....@gmail.com on 4 Mar 2013 at 8:22

GoogleCodeExporter commented 9 years ago
Have to find out why dist tool does not create __init__ on Arch

Original comment by tro...@trouch.com on 4 Mar 2013 at 8:38

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 8 Apr 2013 at 6:43

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 27 Nov 2013 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by tro...@trouch.com on 4 Jan 2014 at 9:01