ros-geographic-info / geographic_info

ROS packages for geographic information
http://ros.org/wiki/geographic_info
66 stars 62 forks source link

convert python3 for noetic #40

Closed SteveMacenski closed 4 years ago

SteveMacenski commented 4 years ago

@sloretz please sanity check me. Especially on the setup.py updates. Seems straight forward but I'm not a ROS-python user so I haven't deal with that in any serious way before.

ROSDistro PR for pyproj incoming and I'll link it here.

Edit: key PR https://github.com/ros/rosdistro/pull/24114

SteveMacenski commented 4 years ago

I believe I've rectified those issues -- take another gander

SteveMacenski commented 4 years ago

Awesome, thanks for the quick feedback.

SteveMacenski commented 4 years ago

@sloretz, you sure I have to update all of the CMakeLists to 3.x.x? I get a bloom error if the metapackage is anything but 2.8.3.

Invalid metapackage:
  Metapackage 'geographic_info': Invalid CMakeLists.txt
Expected:
<<<cmake_minimum_required(VERSION 2.8.3)
project(geographic_info)
find_package(catkin REQUIRED)
catkin_metapackage()
>>>
Got:
<<<cmake_minimum_required(VERSION 3.0.2)
project(geographic_info)
find_package(catkin REQUIRED)
catkin_metapackage()
>>>

Refusing to release invalid metapackage 'geographic_info', metapackage requirements:
  http://ros.org/reps/rep-0127.html#metapackage
sloretz commented 4 years ago

you sure I have to update all of the CMakeLists to 3.x.x? I get a bloom error if the metapackage is anything but 2.8.3.

@SteveMacenski Very sure. What's the version of catkin_pkg on the machine bloom-release was run? I think it needs to be at least 0.4.16 which has https://github.com/ros-infrastructure/catkin_pkg/pull/274

SteveMacenski commented 4 years ago
python-catkin-pkg is already the newest version (0.4.16-100).
Package: python-bloom
Version: 0.9.3-100
sloretz commented 4 years ago

Strange. Is it possible there's another install of catkin_pkg? In a Python 2 interpreter what's the output of:

>>> import inspect
>>> import catkin_pkg
>>> catkin_pkg.__version__
'0.4.16'
>>> inspect.getfile(catkin_pkg)
'/usr/lib/python2.7/dist-packages/catkin_pkg/__init__.pyc'
SteveMacenski commented 4 years ago
In [3]: import catkin_pkg

In [4]: catkin_pkg.__version__
Out[4]: '0.4.16'

In [5]: inspect.getfile(catkin_pkg)
Out[5]: '/usr/lib/python2.7/dist-packages/catkin_pkg/__init__.pyc'

Appears the same to me.

sloretz commented 4 years ago

Weird, talking with @dirk-thomas it seems the only way that message could happen is if catkin_pkg was an older version. Is it possible python3-bloom was installed briefly, maybe while installing rosdeps for a ROS 1 or ROS 2 workspace?

What's the same output of the above in a Python 3 interpreter? What does which bloom-release and head $(which bloom-release) in a bash prompt return? Do you still see the same error message when trying to release now?

SteveMacenski commented 4 years ago
steve@Eve:~$ which bloom-release
/usr/local/bin/bloom-release
steve@Eve:~$ head $(which bloom-release)
#!/usr/bin/python3

# -*- coding: utf-8 -*-
import re
import sys

from bloom.commands.release import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
steve@Eve:~$ 

mhm, I spy with my little eye something that says python3... though changing it to just python didn't resolve.

sloretz commented 4 years ago

Interesting, /usr/local/bin/bloom-release; local suggests that might be a from-source python 3 install of bloom

SteveMacenski commented 4 years ago

I've definitely never built bloom from source

sloretz commented 4 years ago

Hmm, maybe it was installed via pip? Does sudo pip3 uninstall bloom resolve the issue?

SteveMacenski commented 4 years ago

Mhm, that does seem to have fixed it, thanks!

Why was bloom released to pip in the first place?