Skip to content
Open
Changes from all commits
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
11 changes: 7 additions & 4 deletions scripts/python/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
import zipfile
import hashlib
import ssl
import urllib.request
#import urllib.request
import requests
import subprocess
import multiprocessing

Expand Down Expand Up @@ -186,7 +187,10 @@ def check_md5_hash(path, md5_hash):

def download_zipfile(url, archive_path, unzip_path, md5_hash):
if not os.path.exists(archive_path):
urllib.request.urlretrieve(url, archive_path)
r = requests.get(url)
with open(archive_path, 'wb') as outfile:
outfile.write(r.content)
#urllib.request.urlretrieve(url, archive_path)
# check_md5_hash(archive_path, md5_hash)
with zipfile.ZipFile(archive_path, "r") as fid:
fid.extractall(unzip_path)
Expand Down Expand Up @@ -308,8 +312,7 @@ def build_glew(args):
if os.path.exists(path):
return

url = "https://kent.dl.sourceforge.net/project/glew/" \
"glew/2.1.0/glew-2.1.0.zip"
url = "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.zip"
archive_path = os.path.join(args.download_path, "glew-2.1.0.zip")
download_zipfile(url, archive_path, args.build_path,
"dff2939fd404d054c1036cc0409d19f1")
Expand Down