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 bad import in setup.py #2025

Closed
wants to merge 2 commits into from

Conversation

glentakahashi
Copy link

Fixes #2021

@SciTools-assistant SciTools-assistant added the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Mar 25, 2022
@@ -31,8 +31,9 @@
import warnings
from collections import defaultdict
from sysconfig import get_config_var
from distutils.util import convert_path

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E402 module level import not at top of file

setup.py Outdated

from setuptools import Command, Extension, convert_path, setup
from setuptools import Command, Extension, setup

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F401 'setuptools.Command' imported but unused
E402 module level import not at top of file

@SciTools-assistant SciTools-assistant removed the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Mar 25, 2022
from sysconfig import get_config_var

from setuptools import Command, Extension, convert_path, setup
from setuptools import Extension, setup

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E402 module level import not at top of file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure what to do here, want to keep it in the style of the original code, however the original code doesn't have a lint ignore comment. Should one be added?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry about it; setup.py is excluded in setup.cfg, but I guess stickler doesn't check that config file.

@QuLogic
Copy link
Member

QuLogic commented Mar 25, 2022

I actually don't see any point in using convert_path at all, since what it's supposed to do is done in the line above its call.

In fact, I don't see the point in either, since Windows understands / in paths, but we can leave the manual line in there for now.

@greglucas
Copy link
Contributor

@glentakahashi, sorry I opened another PR without realizing you'd already opened this (#2026). I don't think we want distutils here. I agree we can probably just remove the convert_path call altogether.

@glentakahashi
Copy link
Author

Ah @greglucas your version is better, so I'll close this one out and we should use yours

@greglucas
Copy link
Contributor

@glentakahashi I just opened #2027 with yet another approach. Can you comment over there if that works for you too?

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.

Cartopy installation fails with setuptools 61.0.0
5 participants