deps build: use pip to install requests 2.18.4 and it's deps
authorArto Kitula <arto.kitula@gmail.com>
Thu, 21 Sep 2017 06:33:00 +0000 (09:33 +0300)
committerArto Kitula <arto.kitula@gmail.com>
Thu, 21 Sep 2017 06:33:00 +0000 (09:33 +0300)
build_files/build_environment/cmake/requests.cmake
build_files/build_environment/cmake/versions.cmake

index f5aa26b0615eb050027e96897ead4c6ed2583835..412c9b2ccb90a08675f337415e53b55651c240db 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-if(BUILD_MODE STREQUAL Release)
-       if(WIN32)
-               set(REQUESTS_INSTALL_DIR ${LIBDIR}/requests)
-       else()
-               set(REQUESTS_INSTALL_DIR ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION}/site-packages/requests)
-       endif()
+ExternalProject_Add(external_requests
+       DOWNLOAD_COMMAND ""
+       CONFIGURE_COMMAND ""
+       BUILD_COMMAND ""
+       PREFIX ${BUILD_DIR}/requests
+       INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
+)
 
-       ExternalProject_Add(external_requests
-               URL ${REQUESTS_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${REQUESTS_HASH}
-               PREFIX ${BUILD_DIR}/requests
-               CONFIGURE_COMMAND ""
-               BUILD_COMMAND ""
-               INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/requests/src/external_requests/requests ${REQUESTS_INSTALL_DIR}
-       )
-
-       add_dependencies(external_requests Make_Python_Environment)
-endif(BUILD_MODE STREQUAL Release)
+add_dependencies(external_requests Make_Python_Environment)
index a4d834dd22b2e81e96d8bfa07f7cf639b0f5a7a3..df15dd6541771ccb34fa0b7f881a27b386e5acd8 100644 (file)
@@ -145,9 +145,11 @@ set(OPENVDB_VERSION 3.1.0)
 set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
 set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
 
-set(REQUESTS_VERSION v2.10.0)
-set(REQUESTS_URI https://github.com/kennethreitz/requests/archive/${REQUESTS_VERSION}.zip)
-set(REQUESTS_HASH 6ebefdf0210c7f0933f61501334e46c3)
+set(IDNA_VERSION 2.6)
+set(CHARDET_VERSION 3.0.2)
+set(URLLIB3_VERSION 1.22)
+set(CERTIFI_VERSION 2017.7.27.1)
+set(REQUESTS_VERSION 2.18.4)
 
 set(NUMPY_VERSION v1.13.1)
 set(NUMPY_SHORT_VERSION 1.13)