rosinstall-9999.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python{2_7,3_4,3_5} )
  5. SCM=""
  6. if [ "${PV#9999}" != "${PV}" ] ; then
  7. SCM="git-r3"
  8. EGIT_REPO_URI="https://github.com/vcstools/rosinstall"
  9. fi
  10. inherit ${SCM} distutils-r1
  11. DESCRIPTION="Command-line tools for maintaining a workspace of projects for ROS"
  12. HOMEPAGE="http://wiki.ros.org/rosinstall http://wiki.ros.org/roslocate"
  13. if [ "${PV#9999}" != "${PV}" ] ; then
  14. SRC_URI=""
  15. KEYWORDS=""
  16. else
  17. SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
  18. https://github.com/vcstools/rosinstall/archive/${PV}.tar.gz -> ${P}.tar.gz
  19. "
  20. KEYWORDS="~amd64 ~arm"
  21. fi
  22. LICENSE="BSD"
  23. SLOT="0"
  24. IUSE="test"
  25. RDEPEND="
  26. dev-python/catkin_pkg[${PYTHON_USEDEP}]
  27. >=dev-python/vcstools-0.1.38[${PYTHON_USEDEP}]
  28. dev-python/rosdistro[${PYTHON_USEDEP}]
  29. >=dev-util/wstool-0.1.12[${PYTHON_USEDEP}]
  30. dev-python/pyyaml[${PYTHON_USEDEP}]"
  31. DEPEND="${RDEPEND}
  32. test? (
  33. dev-python/nose[${PYTHON_USEDEP}]
  34. dev-vcs/git
  35. dev-vcs/bzr
  36. dev-vcs/mercurial
  37. app-shells/zsh
  38. )
  39. "
  40. python_test() {
  41. # From travis.yml
  42. # Set git config to silence some stuff in the tests
  43. git config --global user.email "foo@example.com"
  44. git config --global user.name "Foo Bar"
  45. # Set the hg user
  46. echo -e "[ui]\nusername = Your Name <your@mail.com>" >> ~/.hgrc
  47. # Set the bzr user
  48. bzr whoami "Your Name <name@example.com>"
  49. # command to run tests
  50. # Local tests work even if ros.org is down
  51. export ROSINSTALL_SKIP_PYTHON3=1
  52. nosetests test || die
  53. }