Esempio n. 1
0
def add_library(paths):
    wheel_fnames = glob('/io/wheelhouse/pyopencl*.whl')
    for fname in wheel_fnames:
        print('Processing', fname)
        with wheeltools.InWheel(fname, fname):
            for lib_path in paths:
                shutil.copy2(lib_path, os.path.join('pyopencl', '.libs'))
Esempio n. 2
0
def add_library(lib_paths, dist_path='dist'):
    wheel_fnames = glob(pjoin(dist_path, '*.whl'))
    for fname in wheel_fnames:
        print('Processing', fname)
        fname = os.path.abspath(fname)
        with wheeltools.InWheel(fname, fname):
            for lib_path in lib_paths:
                shutil.copy2(lib_path, pjoin('symengine', 'lib'))
Esempio n. 3
0
def add_library(paths):
    wheel_fnames = glob('/io/wheelhouse/pyopencl*.whl')
    for fname in wheel_fnames:
        print('Processing', fname)
        with wheeltools.InWheel(fname, fname):
            libs_dir = os.path.join('pyopencl', '.libs')
            os.makedirs(libs_dir, exist_ok=True)
            for lib_path in paths:
                shutil.copy2(lib_path, libs_dir)
Esempio n. 4
0
def add_library(pkg_path, lib_path, dist_path='dist'):
    wheel_fnames = glob(pjoin(pkg_path, dist_path, '*.whl'))
    for fname in wheel_fnames:
        print('Processing', fname)
        with wheeltools.InWheel(fname, fname):
            shutil.copy2(lib_path, pjoin(pkg_path, 'core'))
Esempio n. 5
0
import os
from zipfile import ZipFile
from delocate import wheeltools
from hashlib import sha256
"""Script para copiar los dlls utilizados por la libreria a la wheel. Genera las entradas que 
deben ser anadidas a RECORD"""

mingw_path = r'C:\Program Files (x86)\mingw-w64\i686-4.8.1-posix-dwarf-rt_v3-rev2\mingw32\bin'
dlls = []
wheel_path = r'labugr-1.0.0-cp36-cp36m-win32.whl'
wheel_path2 = r'C:\Users\LuikS\Desktop\labugr\scripts\labugr-1.0.0-cp36-cp36m-win32.whl'

for file in os.listdir(mingw_path):
    if file.endswith(".dll"):
        file_path = os.path.join(mingw_path, file)
        dlls.append(file_path)
        with open(file_path, 'r') as f:
            data = f.read()
            hash_val = sha256(data.encode('utf-8'))
        print('labugr/dll_libs/' + file + ',sha256=' + ',' +
              str(os.path.getsize(file_path)))

print(os.getcwd())
for dll in dlls:
    with wheeltools.InWheel(wheel_path, wheel_path):
        shutil.copy2(lib_path, pjoin('labugr', 'dll_libs'))