aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packaging-tools/build_wrapper.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/packaging-tools/build_wrapper.py b/packaging-tools/build_wrapper.py
index 958e6b556..db33b8d65 100644
--- a/packaging-tools/build_wrapper.py
+++ b/packaging-tools/build_wrapper.py
@@ -343,12 +343,18 @@ def move_files_to_parent_dir(source):
def create_download_documentation_task(base_url, download_path):
- urlpath = urlopen(base_url + "/doc")
- string = urlpath.read().decode('utf-8')
- pattern = re.compile('[0-9a-zA-Z-]*.zip')
+ doc_base_url = base_url + "/doc"
- file_list = pattern.findall(string)
- file_list = list(dict.fromkeys(file_list))
+ useLocal = urlparse.urlparse(doc_base_url).scheme != "file://"
+ if useLocal:
+ file_list = os.listdir(doc_base_url[len("file://"):])
+ else:
+ urlpath = urllib2.urlopen(doc_base_url)
+ string = urlpath.read().decode('utf-8')
+ pattern = re.compile('[0-9a-zA-Z-]*.zip')
+
+ file_list = pattern.findall(string)
+ file_list = list(dict.fromkeys(file_list))
extract_path = os.path.join(download_path, 'tqtc-qt5-documentation')
target_filepath = os.path.join(download_path, 'qt-everywhere-documentation.7z')