sagemath / cysignals

cysignals: interrupt and signal handling for Cython. Source repository for https://pypi.org/project/cysignals/
GNU Lesser General Public License v3.0
43 stars 23 forks source link

make: *** [Makefile:23: build] Error 1 #147

Closed Summwer closed 3 years ago

Summwer commented 3 years ago

Error occured in python2.7

python setup.py build
running build
running build_py
running configure
Traceback (most recent call last):
  File "setup.py", line 217, in <module>
    bdist_egg=no_egg
  File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 173, in run
    super().run()
TypeError: super() takes at least 1 argument (0 given)
make: *** [Makefile:23: build] Error 1
Summwer commented 3 years ago

I have fixed the error. Since using python2.7 super() function is different from pyhton3, we should modify the specific lines in setup.py file where it calling a super() function. In my setup.py file, it's line 154 and line 173. The modified method is as the following:

  1. Modify line 173 in setup.py from super().run() to _build_py.run(self)'

  2. Modify line 154 in setup.py from super().run() to _build_ext.run(self)'

Summwer commented 3 years ago

Wish that developer could fix this bug. Thank you ~ @embray

embray commented 3 years ago

Cysignals dropped Python 2 support since #132 . Python 2 in its entirety is deprecated so I'm not sure why that package is still using it too. I will follow up there.

If you want to install Cysignals from source I would recommend checking out a specific tag like 1.10.3 or installing from pypi.