You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2025/10/03 15:24:21 UTC

(buildstream) branch tristan/pip-origin-description created (now ef3943957)

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a change to branch tristan/pip-origin-description
in repository https://gitbox.apache.org/repos/asf/buildstream.git


      at ef3943957 _pluginfactory/pluginoriginpip.py: Fix the description string

This branch includes the following new commits:

     new ef3943957 _pluginfactory/pluginoriginpip.py: Fix the description string

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(buildstream) 01/01: _pluginfactory/pluginoriginpip.py: Fix the description string

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/pip-origin-description
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit ef3943957332ecf73f6c831bab16676879fc0ea6
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Sat Oct 4 00:21:38 2025 +0900

    _pluginfactory/pluginoriginpip.py: Fix the description string
    
    The `Distribution` object returned by importlib.metadata.distribution() does
    not have a sensible `__str__()` dunder method to rely on. Instead we should
    be using `Distribution.name` and `Distribution.version` members to describe
    the pip package which was loaded in the plugin description string.
---
 src/buildstream/_pluginfactory/pluginoriginpip.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buildstream/_pluginfactory/pluginoriginpip.py b/src/buildstream/_pluginfactory/pluginoriginpip.py
index a6174d080..2fe4563cd 100644
--- a/src/buildstream/_pluginfactory/pluginoriginpip.py
+++ b/src/buildstream/_pluginfactory/pluginoriginpip.py
@@ -101,7 +101,7 @@ class PluginOriginPip(PluginOrigin):
         return (
             os.path.dirname(location),
             str(defaults),
-            "python package '{}' at: {}".format(dist, dist.locate_file("")),
+            "python package '{}' version {} at: {}".format(dist.name, dist.version, dist.locate_file("")),
         )
 
     def load_config(self, origin_node):