File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1047,6 +1047,14 @@ def do_custom_build(self):
10471047 pass
10481048
10491049 if not os .path .isfile (tarball_path ):
1050+
1051+ if sys .version_info [0 ] == 2 :
1052+ from urllib import urlretrieve
1053+ else :
1054+ from urllib .request import urlretrieve
1055+ if not os .path .exists ('build' ):
1056+ os .makedirs ('build' )
1057+
10501058 sourceforge_url = (
10511059 'http://downloads.sourceforge.net/project/freetype'
10521060 '/freetype2/{0}/' .format (LOCAL_FREETYPE_VERSION )
@@ -1059,13 +1067,6 @@ def do_custom_build(self):
10591067 tarball_url = url_fmt .format (tarball )
10601068
10611069 print ("Downloading {0}" .format (tarball_url ))
1062- if sys .version_info [0 ] == 2 :
1063- from urllib import urlretrieve
1064- else :
1065- from urllib .request import urlretrieve
1066-
1067- if not os .path .exists ('build' ):
1068- os .makedirs ('build' )
10691070 try :
10701071 urlretrieve (tarball_url , tarball_path )
10711072 except :
You can’t perform that action at this time.
0 commit comments