rosdep-9999.ebuild 1.4 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,3_6} pypy{,3} )
  5. SCM=""
  6. if [ "${PV#9999}" != "${PV}" ] ; then
  7. SCM="git-r3"
  8. EGIT_REPO_URI="https://github.com/ros-infrastructure/rosdep"
  9. fi
  10. inherit ${SCM} distutils-r1
  11. DESCRIPTION="Command-line tool for installing ROS system dependencies"
  12. HOMEPAGE="http://wiki.ros.org/rosdep"
  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/ros-infrastructure/rosdep/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/rospkg[${PYTHON_USEDEP}]
  28. dev-python/rosdistro[${PYTHON_USEDEP}]
  29. dev-python/pyyaml[${PYTHON_USEDEP}]"
  30. DEPEND="${RDEPEND}
  31. dev-python/nose[${PYTHON_USEDEP}]
  32. test? (
  33. dev-python/coverage[${PYTHON_USEDEP}]
  34. dev-python/mock[${PYTHON_USEDEP}]
  35. )
  36. "
  37. python_test() {
  38. nosetests --with-coverage --cover-package=rosdep2 --with-xunit test || die
  39. }
  40. pkg_postrm() {
  41. if [ "${ROOT:-/}" = "/" ] ; then
  42. einfo "Removing rosdep default sources list."
  43. rm -f "${EPREFIX}/etc/ros/rosdep/sources.list.d/20-default.list"
  44. fi
  45. }
  46. pkg_postinst() {
  47. if [ "${ROOT:-/}" = "/" -a ! -f "${EPREFIX}/etc/ros/rosdep/sources.list.d/20-default.list" ] ; then
  48. einfo "Initializing rosdep"
  49. rosdep init
  50. fi
  51. }