8000 Add mirrors to freetype download by jenshnielsen · Pull Request #6943 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add mirrors to freetype download #6943

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

Merged
merged 4 commits into from
Aug 16, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor common code outside loop
  • Loading branch information
jenshnielsen committed Aug 12, 2016
commit 8c304def3156a7b4d2c765c3c7d7ca8c403725ba
15 changes: 8 additions & 7 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,14 @@ def do_custom_build(self):
pass

if not os.path.isfile(tarball_path):

if sys.version_info[0] == 2:
from urllib import urlretrieve
else:
from urllib.request import urlretrieve
if not os.path.exists('build'):
os.makedirs('build')

sourceforge_url = (
'http://downloads.sourceforge.net/project/freetype'
'/freetype2/{0}/'.format(LOCAL_FREETYPE_VERSION)
Expand All @@ -1059,13 +1067,6 @@ def do_custom_build(self):
tarball_url = url_fmt.format(tarball)

print("Downloading {0}".format(tarball_url))
if sys.version_info[0] == 2:
from urllib import urlretrieve
else:
from urllib.request import urlretrieve

if not os.path.exists('build'):
os.makedirs('build')
try:
urlretrieve(tarball_url, tarball_path)
except:
Expand Down
0