[Slackbuilds-users] Bug in matplotlib setupext.py

Daniel Prosser dpross1100 at msn.com
Tue Mar 17 03:06:48 UTC 2020


Matplotlib has a custom setupext.py script designed to stop the build 
when a dependency is not installed. However, it seems to have a bug 
which makes it crash with this error:

Traceback (most recent call last):  File "setup.py", line 172, in 
<module>    result = package.check()  File 
"/tmp/SBo/matplotlib-2.2.3/setupext.py", line 1480, in check    
print_status(package.name, req_fail_msg)NameError: global name 'package' 
is not defined

Is this the expected behavior? The following patch will avoid the error 
and still stop the build if there is a missing dependency, with an 
actual helpful list of dependencies that have not been installed:

--- setupext.py	2020-03-16 10:02:52.376214282 -0400
+++ setupext.py.new	2020-03-16 10:03:34.462812966 -0400
@@ -1477,7 +1477,7 @@
              req_fail_msg += (os.linesep.join(not_available) +
                              os.linesep*(2*sp_mult)) * min(1, len(not_available))
              req_fail_msg += (os.linesep*2).join(wrong_version)
- print_status(package.name, req_fail_msg)
+ print_status(pack_name, req_fail_msg)
              raise CheckFailed("missing or faulty third-party python packages")
          return "all third-party python packages are present"



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20200316/165ea71a/attachment.htm>

More information about the SlackBuilds-users mailing list