Skip to content

Inline setup_external_build into setupext. #11235

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

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 12, 2018

Also:

  • use tarfile to extract the FreeType tarball on all platforms.
  • less batch script, more Python.
  • more pathlib, less shell=True.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

vcvarsall = msvc.find_vcvarsall(10.0)
if vcvarsall is None:
raise RuntimeError("Microsoft VS 2010 required")
X64 = sys.maxsize > 2 ** 32
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See https://docs.python.org/3/library/platform.html#platform.architecture for why we check bitsize in this manner.

@anntzer anntzer force-pushed the setupexternalcompile branch 3 times, most recently from c9400a0 to 8b0e03f Compare May 12, 2018 09:52
Also:
- use tarfile to extract the FreeType tarball on all platforms.
- less batch script, more Python.
- more pathlib, less shell=True.
@anntzer anntzer force-pushed the setupexternalcompile branch from 8b0e03f to 3f52e47 Compare May 12, 2018 14:34
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Sorry, I lost overview (and motivation to review) half way through the PR.

Can you please try to not mix larger structural/logical changes with many tiny cleanups? I know it's handy to change theses things as you go along. However, two separate PRs would be much easier to review.

try:
urllib.request.urlretrieve(tarball_url, tarball_path)
except IOError: # URLError (a subclass) on Py3.
print("Failed to download {0}".format(tarball_url))
except IOError:
Copy link
Member

Choose a reason for hiding this comment

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

Changed in version 3.3: URLError has been made a subclass of OSError instead of IOError.
https://docs.python.org/3/library/urllib.error.html

We should check for the more specific urllib.error.URLError anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IOError is an alias of OSError since 3.3 (see just after https://docs.python.org/3/library/exceptions.html#ZeroDivisionError).

@anntzer
Copy link
Contributor Author

anntzer commented May 15, 2018

Sounds fair, will split the PR.

@jklymak
Copy link
Member

jklymak commented Jul 5, 2018

So this can be closed, right?

@anntzer
Copy link
Contributor Author

anntzer commented Jul 5, 2018

Yes.

@anntzer anntzer closed this Jul 5, 2018
@anntzer anntzer deleted the setupexternalcompile branch July 5, 2018 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants