From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Desimone, Ashley E" <ashley.e.desimone@intel.com>
Cc: "Pandya, Puja" <puja.pandya@intel.com>
Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 3/3] EdkRepo: Multiple Command Package Build Script Update
Date: Mon, 28 Oct 2019 23:47:37 +0000 [thread overview]
Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5B7F90F@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <20191028232245.6712-3-ashley.e.desimone@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Desimone, Ashley E
Sent: Monday, October 28, 2019 4:23 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; 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 <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
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")
-def build_wheels():
+def build_wheels(extension_pkgs):
dir_path = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
file_path = os.path.join(dir_path, "setup.py")
if ostype == WIN:
check_call("py {} \"{}\" bdist_wheel".format(PYTHON_VERSION, file_path), shell=True, cwd=dir_path)
else:
check_call('python3 "{}" bdist_wheel'.format(file_path), shell=True, cwd=dir_path)
+ for pkg in extension_pkgs:
+ ext_dir_path = os.path.abspath(pkg)
+ ext_file_path = os.path.join(ext_dir_path, 'setup.py')
+ if ostype == WIN:
+ check_call("py {} \"{}\" bdist_wheel".format(PYTHON_VERSION, ext_file_path), shell=True, cwd=ext_dir_path)
+ else:
+ check_call('python3 "{}" bdist_wheel'.format(ext_file_path), shell=True, cwd=ext_dir_path)
print("Wheels built successfully")
-def copy_wheels_and_set_xml(package_version):
+def copy_wheels_and_set_xml(package_version, extension_pkgs):
dir_path = os.path.join(os.path.dirname(os.path.abspath(os.path.dirname(__file__))), "dist")
dest_path = os.path.join(dir_path, "self_extract")
if ostype == 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.join(dest_path, file_name))
+ for pkg in extension_pkgs:
+ ext_dir_path = os.path.join(os.path.abspath(pkg), 'dist')
+ for file_name in os.listdir(ext_dir_path):
+ if fnmatch.fnmatch(file_name, "*.whl"):
+ data = 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_version, wheels)
def create_final_copy_script(version):
@@ -251,6 +266,7 @@ def make_version_cfg_file(version):
install_cfg.write(f)
def main():
+ extension_pkgs = []
print("Building Python packages and generating new version number...")
(version, package_version) = 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)
--
2.16.2.windows.1
next prev parent reply other threads:[~2019-10-28 23:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 23:22 [edk2-staging/EdkRepo][PATCH 1/3] EdkRepo: Multiple Command Package Configuration Support Desimone, Ashley E
2019-10-28 23:22 ` [edk2-staging/EdkRepo] [PATCH 2/3] EdkRepo: Multiple Command Package Command Factory Update Desimone, Ashley E
2019-10-28 23:47 ` Nate DeSimone
2019-10-28 23:22 ` [edk2-staging/EdkRepo] [PATCH 3/3] EdkRepo: Multiple Command Package Build Script Update Desimone, Ashley E
2019-10-28 23:47 ` Nate DeSimone [this message]
2019-10-28 23:47 ` [edk2-devel] [edk2-staging/EdkRepo][PATCH 1/3] EdkRepo: Multiple Command Package Configuration Support Nate DeSimone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02A34F284D1DA44BB705E61F7180EF0AB5B7F90F@ORSMSX113.amr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox