diff --git a/conanfile.py b/conanfile.py index dad9b4e..a32da18 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,5 +1,6 @@ from conans import ConanFile, CMake, tools from conans.model.version import Version +from conans.client.tools.files import rename from conans.errors import ConanInvalidConfiguration import os @@ -94,11 +95,11 @@ def configure(self): def source(self): sha256 = "68bc40cbf47fdb8ee73dfaf0d9c6494cd095cf6294d99de445ab64cf853d278a" tools.get("{}/archive/{}.tar.gz".format(self.homepage, self.version), sha256=sha256) - os.rename('opencv-%s' % self.version, self._source_subfolder) + rename('opencv-%s' % self.version, self._source_subfolder) sha256 = "acb8e89c9e7d1174e63e40532125b60d248b00e517255a98a419d415228c6a55" tools.get("https://github.com/opencv/opencv_contrib/archive/{}.tar.gz".format(self.version), sha256=sha256) - os.rename('opencv_contrib-%s' % self.version, 'contrib') + rename('opencv_contrib-%s' % self.version, 'contrib') for directory in ['libjasper', 'libjpeg-turbo', 'libjpeg', 'libpng', 'libtiff', 'libwebp', 'openexr', 'protobuf', 'zlib']: