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

Does not check python packages installed via GitHub url #923

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 @@ -6,7 +6,7 @@
# same version as in:
# - src/rosdep2/__init__.py
# - stdeb.cfg
'version': '0.22.2',
'version': '0.22.3',
'packages': ['rosdep2', 'rosdep2.ament_packages', 'rosdep2.platforms'],
'package_dir': {'': 'src'},
'install_requires': ['PyYAML >= 3.1', 'setuptools'],
Expand Down
2 changes: 1 addition & 1 deletion src/rosdep2/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# same version as in:
# - setup.py
# - stdeb.cfg
__version__ = '0.22.2'
__version__ = '0.22.3'
15 changes: 13 additions & 2 deletions src/rosdep2/installers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import traceback

from rospkg.os_detect import OsDetect
from urllib.parse import urlparse

from .core import rd_debug, RosdepInternalError, InstallFailed, print_bold, InvalidData

Expand Down Expand Up @@ -599,10 +600,20 @@ def run_command(command, installer_key, failures, verbose):
if not continue_on_error:
raise InstallFailed(failures=failures)

def is_valid_url(url):
try:
out = urlparse(url)
return all([out.scheme, out.netloc])
except ValueError:
return False

# test installation of each
for r in resolved:
if not installer.is_installed(r):
failures.append((installer_key, 'Failed to detect successful installation of [%s]' % (r)))
if not is_valid_url(r):
if not installer.is_installed(r):
failures.append((installer_key, 'Failed to detect successful installation of [%s]' % (r)))
else:
print('WARNING: package "%s" could not be checked, the installation was executed via the URL' % r)
# finalize result
if failures:
raise InstallFailed(failures=failures)
Expand Down
4 changes: 2 additions & 2 deletions stdeb.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
; rosdep-modules same version as in:
; - setup.py
; - src/rosdep2/_version.py
Depends: python-rosdep-modules (>= 0.22.2)
Depends: python-rosdep-modules (>= 0.22.3)
; rosdep-modules same version as in:
; - setup.py
; - src/rosdep2/_version.py
Depends3: python3-rosdep-modules (>= 0.22.2)
Depends3: python3-rosdep-modules (>= 0.22.3)
Conflicts: python3-rosdep, python-rosdep2, python3-rosdep2
Conflicts3: python-rosdep, python-rosdep2, python3-rosdep2
Copyright-File: LICENSE
Expand Down