(fname, plat)
| 176 | |
| 177 | |
| 178 | def unpack_windows_zip(fname, plat): |
| 179 | unzip_base = os.path.join(gettempdir(), 'openblas') |
| 180 | if not os.path.exists(unzip_base): |
| 181 | os.mkdir(unzip_base) |
| 182 | with zipfile.ZipFile(fname, 'r') as zf: |
| 183 | zf.extractall(unzip_base) |
| 184 | if plat == "win-32": |
| 185 | target = os.path.join(unzip_base, "32") |
| 186 | else: |
| 187 | target = os.path.join(unzip_base, "64") |
| 188 | # Copy the lib to openblas.lib. Once we can properly use pkg-config |
| 189 | # this will not be needed |
| 190 | lib = glob.glob(os.path.join(target, 'lib', '*.lib')) |
| 191 | if len(lib) == 1: |
| 192 | # The 64-bit tarball already has these copied, no need to do it |
| 193 | for f in lib: |
| 194 | shutil.copy(f, os.path.join(target, 'lib', 'openblas.lib')) |
| 195 | shutil.copy(f, os.path.join(target, 'lib', 'openblas64_.lib')) |
| 196 | # Copy the dll from bin to lib so system_info can pick it up |
| 197 | dll = glob.glob(os.path.join(target, 'bin', '*.dll')) |
| 198 | for f in dll: |
| 199 | shutil.copy(f, os.path.join(target, 'lib')) |
| 200 | return target |
| 201 | |
| 202 | |
| 203 | def unpack_targz(fname): |
no test coverage detected