PK~Ltbuild_install_wheels.py"""Build or install wheel packages for passing customize code between modules""" __version__ = '0.1.0' import os from subprocess import call # calling pip3.6 in CentOS container pip_command = 'pip' if os.name == 'nt' else 'pip3.6' def build_wheels(target_dir: str): """ Build wheels to target directory, need to locate current file in setup.py folder :param target_dir: :return: """ call([f'{pip_command}', 'wheel', '.', '--wheel-dir', target_dir]) def install_requirements(dir_name: str): """ install all the wheels in dir_name, find all the wheel files by '*.whl' :param dir_name: """ for whl_file in find_whl_files(dir_name): print(f'installing package {whl_file}') install_package(whl_file) def find_whl_files(input_dir): whl_files = [] for root, dirs, files in os.walk(input_dir): for file in files: if file.endswith(".whl"): whl_files.append(os.path.join(root, file)) return whl_files def install_package(whl_path): print(f'installing {whl_path}') call([f'{pip_command}', 'install', whl_path]) PKS}L5GG,build_install_wheels-0.1.0.dist-info/LICENSEThe MIT License (MIT) Copyright (c) 2018 xichen3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!Hp!Qa*build_install_wheels-0.1.0.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,zd&Y)r$[)T&UD"PK!Hn:*-build_install_wheels-0.1.0.dist-info/METADATA=R0 E @v^Q)M8h-eSI:˫s0dScިxrݙd2":Q7o]o:M8 >Dc?̀0-/|A +E=*N- cQj5PK[[,[oږx|yr+=[Ak8v1vs>^PK!HK}+build_install_wheels-0.1.0.dist-info/RECORDͽr0g 42tiZ9PT$6\<}'w!\4/ΘTz?o%k[F<Ɖ/} IYQS:w@۳O:ҡ^ kaBIp_>C M̹(Y&3 @ж%R]DM!]wcVK2,xuf^L #k#=6֜L¢}oƏc