From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.5382.1572306459932840844 for ; Mon, 28 Oct 2019 16:47:40 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 16:47:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,241,1569308400"; d="scan'208";a="189769621" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by orsmga007.jf.intel.com with ESMTP; 28 Oct 2019 16:47:39 -0700 Received: from orsmsx122.amr.corp.intel.com (10.22.225.227) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 28 Oct 2019 16:47:38 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX122.amr.corp.intel.com ([169.254.11.32]) with mapi id 14.03.0439.000; Mon, 28 Oct 2019 16:47:38 -0700 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Desimone, Ashley E" CC: "Pandya, Puja" Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 3/3] EdkRepo: Multiple Command Package Build Script Update Thread-Topic: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 3/3] EdkRepo: Multiple Command Package Build Script Update Thread-Index: AQHVjeapL78sQAb8m0qJIo5xA/ojHKdwuFaw Date: Mon, 28 Oct 2019 23:47:37 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5B7F90F@ORSMSX113.amr.corp.intel.com> References: <20191028232245.6712-1-ashley.e.desimone@intel.com> <20191028232245.6712-3-ashley.e.desimone@intel.com> In-Reply-To: <20191028232245.6712-3-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTI4NzM1MGEtOWNmNi00MmU0LTgwZGMtNDI1MWRiYzk4ZDc2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRThobVcxbDlVVWRETGJUc1JSa3dNV3p1ejd4ZG1tYmoyOEYrXC95bWdsMUc1REtEaldLV3BJd1JKK1RSTkoybHgifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: devel@edk2.groups.io On Behalf Of Desimone, A= shley E Sent: Monday, October 28, 2019 4:23 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja <= puja.pandya@intel.com> Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 3/3] EdkRepo: Multiple= Command Package Build Script Update Add support for building extension packages. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- build-scripts/set_version_and_build_wheels.py | 24 ++++++++++++++++++++--= -- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/build-scripts/set_version_and_build_wheels.py b/build-scripts= /set_version_and_build_wheels.py index e8d467e..6fd5ab5 100755 --- a/build-scripts/set_version_and_build_wheels.py +++ b/build-scripts/set_version_and_build_wheels.py @@ -195,16 +195,23 @@ def make_selfextract_version_script(version): ver.write('chcp 437\n') print("VersionInfo script written to set_version.bat\n") =20 -def build_wheels(): +def build_wheels(extension_pkgs): dir_path =3D os.path.dirname(os.path.abspath(os.path.dirname(__file__= ))) file_path =3D os.path.join(dir_path, "setup.py") if ostype =3D=3D WIN: check_call("py {} \"{}\" bdist_wheel".format(PYTHON_VERSION, file= _path), shell=3DTrue, cwd=3Ddir_path) else: check_call('python3 "{}" bdist_wheel'.format(file_path), shell=3D= True, cwd=3Ddir_path) + for pkg in extension_pkgs: + ext_dir_path =3D os.path.abspath(pkg) + ext_file_path =3D os.path.join(ext_dir_path, 'setup.py') + if ostype =3D=3D WIN: + check_call("py {} \"{}\" bdist_wheel".format(PYTHON_VERSION, = ext_file_path), shell=3DTrue, cwd=3Dext_dir_path) + else: + check_call('python3 "{}" bdist_wheel'.format(ext_file_path), = shell=3DTrue, cwd=3Dext_dir_path) print("Wheels built successfully") =20 -def copy_wheels_and_set_xml(package_version): +def copy_wheels_and_set_xml(package_version, extension_pkgs): dir_path =3D os.path.join(os.path.dirname(os.path.abspath(os.path.dir= name(__file__))), "dist") dest_path =3D os.path.join(dir_path, "self_extract") if ostype =3D=3D LINUX: @@ -218,6 +225,14 @@ def copy_wheels_and_set_xml(package_version): if data: wheels.append((data.group(1), file_name)) _copy_file(os.path.join(dir_path, file_name), os.path.joi= n(dest_path, file_name)) + for pkg in extension_pkgs: + ext_dir_path =3D os.path.join(os.path.abspath(pkg), 'dist') + for file_name in os.listdir(ext_dir_path): + if fnmatch.fnmatch(file_name, "*.whl"): + data =3D wheel_package.match(file_name) + if data: + wheels.append((data.group(1), file_name)) + _copy_file(os.path.join(ext_dir_path, file_name), os.= path.join(dest_path, file_name)) _set_version_number_and_wheels_cr_tools_installer_config(package_vers= ion, wheels) =20 def create_final_copy_script(version): @@ -251,6 +266,7 @@ def make_version_cfg_file(version): install_cfg.write(f) =20 def main(): + extension_pkgs =3D [] print("Building Python packages and generating new version number..."= ) (version, package_version) =3D get_current_version_number() set_version_number_setup_py(package_version) @@ -259,8 +275,8 @@ def main(): set_version_number_setup_launcher_rc(version) make_selfextract_version_script(version) print("Version number generated and set successfully") - build_wheels() - copy_wheels_and_set_xml(package_version) + build_wheels(extension_pkgs) + copy_wheels_and_set_xml(package_version, extension_pkgs) make_version_cfg_file(version) create_final_copy_script(version) =20 --=20 2.16.2.windows.1