From 1940c35cce172a46821cc224afaa720db89bee98 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Mon, 25 Oct 2021 13:23:19 -0400 Subject: [PATCH] Add wheel building support Add ability to generate python wheels to openstack-pkg-tools. This patch is needed in order to generate python wheels for openstack clients. Story: 2009101 Task: 43516 Signed-off-by: Charles Short Change-Id: I03b644da500f843c33ea40e2322429602d8dbfa7 --- .../debian/deb_patches/series | 1 + .../deb_patches/stx-add-wheel-support.patch | 53 +++++++++++++++++++ .../openstack-pkg-tools/debian/meta_data.yaml | 10 ++++ 3 files changed, 64 insertions(+) create mode 100644 openstack/openstack-pkg-tools/debian/deb_patches/series create mode 100644 openstack/openstack-pkg-tools/debian/deb_patches/stx-add-wheel-support.patch create mode 100644 openstack/openstack-pkg-tools/debian/meta_data.yaml diff --git a/openstack/openstack-pkg-tools/debian/deb_patches/series b/openstack/openstack-pkg-tools/debian/deb_patches/series new file mode 100644 index 00000000..315d03bb --- /dev/null +++ b/openstack/openstack-pkg-tools/debian/deb_patches/series @@ -0,0 +1 @@ +stx-add-wheel-support.patch diff --git a/openstack/openstack-pkg-tools/debian/deb_patches/stx-add-wheel-support.patch b/openstack/openstack-pkg-tools/debian/deb_patches/stx-add-wheel-support.patch new file mode 100644 index 00000000..1325507d --- /dev/null +++ b/openstack/openstack-pkg-tools/debian/deb_patches/stx-add-wheel-support.patch @@ -0,0 +1,53 @@ +Description: Add support for building python3 wheel in Debian Openstack +Author: Chuck Short +diff -Nru openstack-pkg-tools-117/build-tools/pkgos-dh_auto_install openstack-pkg-tools-117+nmu1/build-tools/pkgos-dh_auto_install +--- openstack-pkg-tools-117/build-tools/pkgos-dh_auto_install 2020-11-29 19:50:57.000000000 +0000 ++++ openstack-pkg-tools-117+nmu1/build-tools/pkgos-dh_auto_install 2021-10-03 15:10:16.000000000 +0000 +@@ -20,6 +20,10 @@ + PKGOS_IN_TMP=yes + shift + ;; ++ "--wheel") ++ PKGOS_USE_WHEEL=yes ++ shift ++ ;; + *) + ;; + esac +@@ -50,6 +54,11 @@ + for pyvers in ${PYTHON3S}; do + python${pyvers} setup.py install --install-layout=deb --root $(pwd)/debian/${TARGET_DIR} + done ++ if [ "${PKGOS_USE_WHEEL}" = "yes" ]; then ++ for pyvers in ${PYTHON3S}; do ++ python${pyvers} setup.py bdist_wheel --universal -d $(pwd)/debian/python3-${PY_MODULE_NAME}-wheel/usr/share/python-wheel ++ done ++ fi + fi + rm -rf $(pwd)/debian/python*/usr/lib/python*/dist-packages/*.pth + rm -rf $(pwd)/debian/tmp/usr/lib/python*/dist-packages/*.pth +diff -Nru openstack-pkg-tools-117/debian/changelog openstack-pkg-tools-117+nmu1/debian/changelog +--- openstack-pkg-tools-117/debian/changelog 2020-11-29 19:50:57.000000000 +0000 ++++ openstack-pkg-tools-117+nmu1/debian/changelog 2021-10-03 15:10:16.000000000 +0000 +@@ -1,3 +1,10 @@ ++openstack-pkg-tools (117+nmu1) unstable; urgency=medium ++ ++ * Non-maintainer upload. ++ * build-tools/pkgos-dh_auto_install: Add wheel support. ++ ++ -- Chuck Short Sun, 03 Oct 2021 15:10:16 +0000 ++ + openstack-pkg-tools (117) unstable; urgency=medium + + * Using override_installsystemd instead of override_dh_systemd_enable +diff -Nru openstack-pkg-tools-117/debian/control openstack-pkg-tools-117+nmu1/debian/control +--- openstack-pkg-tools-117/debian/control 2020-11-29 19:50:57.000000000 +0000 ++++ openstack-pkg-tools-117+nmu1/debian/control 2021-10-03 15:10:16.000000000 +0000 +@@ -16,6 +16,7 @@ + Multi-Arch: foreign + Depends: + python3-pip, ++ python3-wheel, + gettext, + jq, + po-debconf, diff --git a/openstack/openstack-pkg-tools/debian/meta_data.yaml b/openstack/openstack-pkg-tools/debian/meta_data.yaml new file mode 100644 index 00000000..7dca6aa6 --- /dev/null +++ b/openstack/openstack-pkg-tools/debian/meta_data.yaml @@ -0,0 +1,10 @@ +--- +debname: openstack-pkg-tools +debver: 117 +dl_path: + name: openstack-pkg-tools-debian-117.tar.gz + url: https://salsa.debian.org/openstack-team/debian/openstack-pkg-tools/-/archive/debian/117/openstack-pkg-tools-debian-117.tar.gz + md5sum: 6c26ff316b869ca12e09e7f3e77c150e +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true