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

evaluate conditions before collecting dependencies #654

Merged
merged 1 commit into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
version=__version__, # noqa:F821
packages=['rosdep2', 'rosdep2.platforms'],
package_dir={'': 'src'},
install_requires=['catkin_pkg', 'rospkg >= 1.0.37', 'rosdistro >= 0.7.0', 'PyYAML >= 3.1'],
install_requires=['catkin_pkg >= 0.4.0', 'rospkg >= 1.0.37', 'rosdistro >= 0.7.0', 'PyYAML >= 3.1'],
test_suite='nose.collector',
test_requires=['mock', 'nose >= 1.0'],
scripts=['scripts/rosdep', 'scripts/rosdep-source'],
Expand Down
5 changes: 4 additions & 1 deletion src/rosdep2/rospkg_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

from __future__ import print_function

import os

import catkin_pkg.package
import rospkg

Expand Down Expand Up @@ -137,8 +139,9 @@ def get_rosdeps(self, resource_name, implicit=True):

if resource_name in self.get_catkin_paths():
pkg = catkin_pkg.package.parse_package(self.get_catkin_paths()[resource_name])
pkg.evaluate_conditions(os.environ)
deps = pkg.build_depends + pkg.buildtool_depends + pkg.run_depends + pkg.test_depends
return [d.name for d in deps]
return [d.name for d in deps if d.evaluated_condition]
elif resource_name in self.get_loadable_resources():
return self._rospack.get_rosdeps(resource_name, implicit=implicit)
elif resource_name in self._rosstack.list():
Expand Down
4 changes: 2 additions & 2 deletions stdeb.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[DEFAULT]
Depends: ca-certificates, python-rospkg (>= 1.0.37), python-yaml, python-catkin-pkg, python-rosdistro (>= 0.7.0)
Depends3: ca-certificates, python3-rospkg (>= 1.0.37), python3-yaml, python3-catkin-pkg, python3-rosdistro (>= 0.7.0)
Depends: ca-certificates, python-rospkg (>= 1.0.37), python-yaml, python-catkin-pkg (>= 0.4.0), python-rosdistro (>= 0.7.0)
Depends3: ca-certificates, python3-rospkg (>= 1.0.37), python3-yaml, python3-catkin-pkg (>= 0.4.0), python3-rosdistro (>= 0.7.0)
Conflicts: python3-rosdep, python-rosdep2, python3-rosdep2
Conflicts3: python-rosdep, python-rosdep2, python3-rosdep2
Copyright-File: LICENSE
Expand Down