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

setup: remove dep on backport of shutil #481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radfish
Copy link

@radfish radfish commented Jun 24, 2024

This backport was needed only for Python 2 (the shutil.which module was backported from Python 3 to 2). In Python 3, the module is imported from the built-in standard library.

This resolves issues with packaging for distributions, since that backported package doesn't exist.ror if missing.

See libagent/util.py:241:

    try:
        # For Python 3
        from shutil import which as _which
    except ImportError:
        # For Python 2
        from backports.shutil_which import which as _which

If Python 2 is still supported, then the dependency in setup.py would need to be made conditional on Python version. I am assuming Python 2 is not actually supported, so I just removed the dependency altogether. This try catch in util.py could also be removed, if Python 2 is not actually supported.

This backport was needed only for Python 2 (the shutil.which module was
backported from Python 3 to 2). In Python 3, the module is imported from
the built-in standard library.

This resolves issues with packaging for distributions, since that
backported package doesn't exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant