SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using Slackware 14.2 and SlackBuilds, I'm trying to build matplotlib for default python, but got the following error. Any idea what could be wrong?
Code:
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.2.3]
python: yes [2.7.17 (default, Oct 20 2019, 14:16:51) [GCC
5.5.0]]
platform: yes [linux2]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.14.3]
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
I just tried it and it built fine here: the line after the numpy one in my output is
Code:
install_requires: yes [all third-party python packages are present]
have you installed all of the dependencies listed on this page (and the dependencies of the dependencies and so on...)?
I had to install these packages to let it build
I've had that issue with the matplotlib SlackBuild before too. For me it was fixed by commenting out this line in matplotlib.SlackBuild:
Code:
# Use modified setupext.py to make sure that the build process gets
# interrupted if requirements are not fulfilled
#
cat "${CWD}/setupext.py" > setupext.py
But please make sure you have all the dependencies installed first, because this will bypass the feature that you see in that comment. I think this is a bug in the modified setupext.py script, but my limited attempt to track it down in the past was not successful (and obviously the script must work for some people).
Actually, I think this might fix it. Please give this change to setupext.py a try before commenting out the line in the SlackBuild mentioned previously.
@ponce: not yet, I'm in dependency hell. But the script shouldn't break, it should tell me which deps I'm missing. And it actually did for numpy!
@montagdude: yes, that change fixes the problem, now I get a nice list of missing deps, next one is subprocess32.
Code:
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.2.3]
python: yes [2.7.17 (default, Oct 20 2019, 14:16:51) [GCC
5.5.0]]
platform: yes [linux2]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.14.3]
subprocess32: ERROR: At least one third-party python package is
missing or has the wrong version: cycler could not
be found pyparsing could not be found dateutil could
not be found pytz could not be found six could not
be found kiwisolver could not be found
backports.functools_lru_cache could not be found
subprocess32 could not be found
@ponce: not yet, I'm in dependency hell. But the script shouldn't break, it should tell me which deps I'm missing. And it actually did for numpy!
I think you are using the SlackBuilds.org' scripts wrong: before installing a specific script you should install whatever is listed in the relative *.info file as "REQUIRED" (and whatever is required by what's required and so on).
you are doing twice the work that has already been done for you by the maintainer of the script: as I told you, just building the needed SlackBuilds in order (they are listed above) I had a package ready for matplotlib in no time.
I think you are using the SlackBuilds.org' scripts wrong: before installing a specific script you should install whatever is listed in the relative *.info file as "REQUIRED" (and whatever is required by what's required and so on).
you are doing twice the work that has already been done for you by the maintainer of the script: as I told you, just building the needed SlackBuilds in order (they are listed above) I had a package ready for matplotlib in no time.
But the point remains that the custom setupext.py has a bug and isn't doing what it is intended to do. Rather than failing with a NameError, it should report the missing package and exit gracefully.
But the point remains that the custom setupext.py has a bug and isn't doing what it is intended to do. Rather than failing with a NameError, it should report the missing package and exit gracefully.
if you think so report this to the matplotlib maintainer, maybe he will explain why he used this instead of the stock one (but a partial explaination seems to be also in the comment from the SlackBuild you quoted above).
if you think so report this to the matplotlib maintainer, maybe he will explain why he used this instead of the stock one (but a partial explaination seems to be also in the comment from the SlackBuild you quoted above).
I plan to when I get the opportunity. But maybe cmk77 can confirm, does the script still stop due to missing dependencies after the fix from post #4 is applied? I find it unlikely that the maintainer purposely put in a nonexistent variable name ("package") to make the script crash with an unhelpful (to the user) error message when a dependency is missing.
Last edited by montagdude; 03-16-2020 at 12:51 PM.
@ponce: yes, I'm doing this the wrong way. Matplotlib has 10 deps, some of which have other deps, slackbuilding it all in the right order will take time.
@ponce: yes, I'm doing this the wrong way. Matplotlib has 10 deps, some of which have other deps, slackbuilding it all in the right order will take time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.