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

Add python-ifaddr #39511

Closed
wants to merge 1 commit into from
Closed

Add python-ifaddr #39511

wants to merge 1 commit into from

Conversation

lalten
Copy link

@lalten lalten commented Jan 10, 2024

Please add python-ifaddr to the rosdep database.
Needed in ros2/ros2cli#875

Package name:

python-ifaddr

Package Upstream Source:

https://github.com/pydron/ifaddr

Purpose of using this:

python-netifaces (https://github.com/al45tair/netifaces) is unmaintained: al45tair/netifaces#78. ifaddr is an alternative.

Distro packaging links:

Links to Distribution Packages

@lalten lalten requested a review from a team as a code owner January 10, 2024 21:07
@github-actions github-actions bot added the rosdep Issue/PR is for a rosdep key label Jan 10, 2024
@@ -1941,6 +1941,13 @@ python-hypothesis:
gentoo: [dev-python/hypothesis]
ubuntu:
'*': [python-hypothesis]
python-ifaddr:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cottsay do you know why it would be suggesting python2-ifaddr for opensuse when the package URL itself is python-ifaddr?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python2-ifaddr RPM package provides a virtual package called python-ifaddr:

$ rpm --qf '[%{PROVIDES}\n]' -qp https://download.opensuse.org/distribution/leap/15.2/repo/oss/noarch/python2-ifaddr-0.1.6-lp152.2.1.noarch.rpm
python-ifaddr
python2-ifaddr

In Fedora, it was normal for Python packages to provide the "unversioned" python package name to ease the transition away from the unversioned package names. Evidently openSUSE did the same thing.

Two notes here:

  1. We should update our openSUSE Leap version target to 15.5, where the Python 2 packages are no longer available so warnings like this won't show up.
  2. Why is the key python-ifaddr and not python3-ifaddr? Shouldn't new keys follow the Ubuntu package name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python-ifaddr:
python3-ifaddr:

For new python keys they should be python3-* to match the key values which all appear to be python 3.

Note that this will require it to be re-alphabetized too. And should avoid the opensuse python2 question above too.

@@ -1941,6 +1941,13 @@ python-hypothesis:
gentoo: [dev-python/hypothesis]
ubuntu:
'*': [python-hypothesis]
python-ifaddr:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python2-ifaddr RPM package provides a virtual package called python-ifaddr:

$ rpm --qf '[%{PROVIDES}\n]' -qp https://download.opensuse.org/distribution/leap/15.2/repo/oss/noarch/python2-ifaddr-0.1.6-lp152.2.1.noarch.rpm
python-ifaddr
python2-ifaddr

In Fedora, it was normal for Python packages to provide the "unversioned" python package name to ease the transition away from the unversioned package names. Evidently openSUSE did the same thing.

Two notes here:

  1. We should update our openSUSE Leap version target to 15.5, where the Python 2 packages are no longer available so warnings like this won't show up.
  2. Why is the key python-ifaddr and not python3-ifaddr? Shouldn't new keys follow the Ubuntu package name?

Comment on lines +1949 to +1950
ubuntu:
'*': [python3-ifaddr]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be simplified:

Suggested change
ubuntu:
'*': [python3-ifaddr]
ubuntu: [python3-ifaddr]

@adityapande-1995 adityapande-1995 added the changes requested Maintainers have asked for changes to the pull request label Jan 12, 2024
@@ -1941,6 +1941,13 @@ python-hypothesis:
gentoo: [dev-python/hypothesis]
ubuntu:
'*': [python-hypothesis]
python-ifaddr:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python-ifaddr:
python3-ifaddr:

For new python keys they should be python3-* to match the key values which all appear to be python 3.

Note that this will require it to be re-alphabetized too. And should avoid the opensuse python2 question above too.

@mjcarroll
Copy link
Member

@lalten friendly ping.

@lalten
Copy link
Author

lalten commented Jan 17, 2024

Thanks for the ping. I originally needed ifaddr for ros2/ros2cli#875, but that PR ended up using python3-psutils instead, which turns out contains all features of ifaddr already. Thanks for all the reviews and insightful python/python3 comments. I'm going to close this as it's not needed anymore now.

@lalten lalten closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Maintainers have asked for changes to the pull request rosdep Issue/PR is for a rosdep key
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants