question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails with CleanCommand super()-call

See original GitHub issue

While trying to upgrade the BitBake recipes for python-semver (Python 2 and Python 3) from version 2.8.1 to 2.9.1, I’ve encountered the following error which seems to have been introduced by commit https://github.com/python-semver/python-semver/commit/017e29633562acc8ae9a76c7c8389424263dafd0#diff-2eeaed663bd0d25b7e608891384b7298L39-R39.

Here is the relevant BitBake log for Python 3.7:

ERROR: Execution of '/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python3-semver/2.9.1-r0/temp/run.do_configure.28554' failed with exit code 1:
running clean
Traceback (most recent call last):
  File "setup.py", line 101, in <module>
    entry_points={"console_scripts": ["pysemver = semver:main"]},
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python3-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python3-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python3-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python3-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 41, in run
    super(CleanCommand, self).run()
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python3-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python3.7/distutils/cmd.py", line 176, in run
    % self.__class__)
RuntimeError: abstract method -- subclass <class '__main__.Clean'> must override
WARNING: exit code 1 from a shell command.

And here is the corresponding log for Python 2.7:

ERROR: Execution of '/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/temp/run.do_configure.32044' failed with exit code 1:
running clean
Traceback (most recent call last):
  File "setup.py", line 101, in <module>
    entry_points={"console_scripts": ["pysemver = semver:main"]},
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 41, in run
    super(CleanCommand, self).run()
TypeError: super() argument 1 must be type, not classobj
WARNING: exit code 1 from a shell command.

Looking at the documentation for super() in Python 3 and Python 2 makes me wonder if super(CleanCommand, self).run() might be a typo and should have been super(Clean, self).run().

Changing super(CleanCommand, self).run() to super(Clean, self).run() apparently solves the problem for Python 3. For Python 2, the error message stays more or less the same:

ERROR: Execution of '/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/temp/run.do_configure.2883' failed with exit code 1:
running clean
Traceback (most recent call last):
  File "setup.py", line 101, in <module>
    entry_points={"console_scripts": ["pysemver = semver:main"]},
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/yocto/build/3.0-zeus/bbb/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/python-semver/2.9.1-r0/recipe-sysroot-native/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 41, in run
    super(Clean, self).run()
TypeError: super() argument 1 must be type, not classobj
WARNING: exit code 1 from a shell command.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
menschel-dcommented, Feb 29, 2020

After applying CleanCommand.run(self) from #226, BitBake is able to build python-semver again. 😃

Below is the identical output of BitBake for both Python 2 and 3:

DEBUG: Executing shell function do_configure
running clean
semver.egg-info/ removed ...
DEBUG: Shell function do_configure finished
DEBUG: Executing python function do_qa_configure
DEBUG: Python function do_qa_configure finished
0reactions
tomschrcommented, Feb 29, 2020

@menschel-d Cool! 👍 Thanks to @scls19fr for the quick merge! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

setup.py leaves build, dist, .egg-info etc + even clean doesn't ...
I had problems with that, I added data files to MANIFEST.in , added include_package_data=True to setup() and built the package again ( python ......
Read more >
Why is super.super.method(); not allowed in Java?
Calling of super.super.method() make sense when you can't change code of base class. This often happens when you are extending an existing library....
Read more >
super - JavaScript - MDN Web Docs - Mozilla
The super keyword is used to access properties on an object literal or class's [[Prototype]], or invoke a superclass's constructor.
Read more >
Supercharge Your Classes With Python super()
Calling the previously built methods with super() saves you from needing to rewrite those methods in your subclass, and allows you to swap...
Read more >
Make Clean Command: A Detailed Instruction For Beginner ...
Make clean is a special command that deletes objects and executable files from an editor. Read this guide to know how and when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found