Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom setup.py commands with newer setuptools #451

Merged
merged 1 commit into from Jan 19, 2021

Commits on Jan 18, 2021

  1. Fix custom commands with newer setuptools

    Fix custom commands to handle additional arguments to the run() method.
    This is needed with newer versions of setuptools since they've started
    passing 'show_deprecation' kwarg in easy_install command, and this
    resulted in the following error:
    
    ```
    Traceback (most recent call last):
      File "/tmp/pytest-cov/./setup.py", line 86, in <module>
        setup(
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.9/site-packages/setuptools/command/install.py", line 67, in run
        self.do_egg_install()
      File "/usr/lib/python3.9/site-packages/setuptools/command/install.py", line 117, in do_egg_install
        cmd.run(show_deprecation=False)
    TypeError: run() got an unexpected keyword argument 'show_deprecation'
    ```
    
    While at it, future-proof all overriden commands to accept pass any
    arguments through.
    mgorny committed Jan 18, 2021
    Copy the full SHA
    307b892 View commit details
    Browse the repository at this point in the history