Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Use cross-platform compatible rename function #63

Open
wants to merge 1 commit into
base: release/4.3.0
Choose a base branch
from
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
5 changes: 3 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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']:
Expand Down