Here is an example of what I am seeing. I have a module installed with pip and a ROS node using catkin. The files excluded from stage are what conflicts occur with the two plugins. When they are excluded using stage the snap builds, but the ds4drv module installed using pip will not run. The following error occurs:
Traceback (most recent call last):
File "/snap/bar-base/x32/bin/ds4drv", line 7, in <module>
from ds4drv.__main__ import main
File "/snap/bar-base/x32/lib/python3.5/site-packages/ds4drv/__main__.py", line 5, in <module>
from .actions import ActionRegistry
File "/snap/bar-base/x32/lib/python3.5/site-packages/ds4drv/actions/__init__.py", line 1, in <module>
from ..action import ActionRegistry
File "/snap/bar-base/x32/lib/python3.5/site-packages/ds4drv/action.py", line 1, in <module>
from .config import add_controller_option
File "/snap/bar-base/x32/lib/python3.5/site-packages/ds4drv/config.py", line 15, in <module>
from .uinput import parse_uinput_mapping
File "/snap/bar-base/x32/lib/python3.5/site-packages/ds4drv/uinput.py", line 6, in <module>
from evdev import UInput, UInputError, ecodes
File "/snap/bar-base/x32/lib/python3.5/site-packages/evdev/__init__.py", line 7, in <module>
from evdev.device import DeviceInfo, InputDevice, AbsInfo
File "/snap/bar-base/x32/lib/python3.5/site-packages/evdev/device.py", line 10, in <module>
from evdev.eventio_async import EventIO
File "/snap/bar-base/x32/lib/python3.5/site-packages/evdev/eventio_async.py", line 3, in <module>
import asyncio
File "/snap/bar-base/x32/usr/lib/python3.5/asyncio/__init__.py", line 21, in <module>
from .base_events import *
File "/snap/bar-base/x32/usr/lib/python3.5/asyncio/base_events.py", line 18, in <module>
import concurrent.futures
File "/snap/bar-base/x32/usr/lib/python2.7/dist-packages/concurrent/futures/__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "/snap/bar-base/x32/usr/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 357
raise type(self._exception), self._exception, self._traceback
The following is the snapcraft.yaml that produces this.
name: robot-base
version: '0.1'
summary: base snap
description: |
This snap includes all of the ROS modules and other code to run the base of the
robot.
grade: devel
confinement: devmode
parts:
bar-pip:
plugin: python
python-packages: [ds4drv]
stage-packages: [
bluez,
]
bar-base:
plugin: catkin
rosdistro: kinetic
rosinstall-files: [ros_navigation.rosinstall]
stage-packages: [
fluid,
python-boto3,
python-requests,
python-rosdep,
python-ipdb,
chrony,
ros-kinetic-pcl-ros,
ros-kinetic-desktop-full,
]
catkin-packages: [
amcl,
]
stage:
- -usr/bin/2to3-3.5
- -usr/bin/py3clean
- -usr/bin/py3compile
- -usr/bin/pydoc3.5
- -usr/lib/python3.5/base64.py
- -usr/lib/python3.5/cProfile.py
- -usr/lib/python3.5/cgi.py
- -usr/lib/python3.5/encodings/rot_13.py
- -usr/lib/python3.5/idlelib/PyShell.py
- -usr/lib/python3.5/keyword.py
- -usr/lib/python3.5/lib2to3/pgen2/token.py
- -usr/lib/python3.5/pdb.py
- -usr/lib/python3.5/platform.py
- -usr/lib/python3.5/profile.py
- -usr/lib/python3.5/pydoc.py
- -usr/lib/python3.5/quopri.py
- -usr/lib/python3.5/sitecustomize.py
- -usr/lib/python3.5/smtpd.py
- -usr/lib/python3.5/smtplib.py
- -usr/lib/python3.5/symbol.py
- -usr/lib/python3.5/tabnanny.py
- -usr/lib/python3.5/tarfile.py
- -usr/lib/python3.5/test/pystone.py
- -usr/lib/python3.5/test/regrtest.py
- -usr/lib/python3.5/timeit.py
- -usr/lib/python3.5/trace.py
- -usr/lib/python3.5/uu.py
- -usr/lib/python3.5/webbrowser.py
- -usr/share/apport/package-hooks/source_bluez.py
- -usr/share/dh-python/dh_pypy
- -usr/share/dh-python/dh_python2
- -usr/share/dh-python/dh_python3
- -usr/share/dh-python/dhpython/_defaults.py
- -usr/share/dh-python/pybuild
- -usr/share/python3/py3versions.py
apps:
bash:
command: bash
ds4drv:
command: ds4drv
Here is the .rosinstall file referenced:
- git:
local-name: ros_navigation
uri: https://github.com/ros-planning/navigation.git
version: kinetic-devel