From 30fbbf72bee79055c8d414708a1a95d1d88a34b4 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 3 Sep 2024 14:50:49 -0700 Subject: [PATCH 1/3] Fix wheel name --- setup.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 376eb70..ef27867 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,21 @@ # Copyright 2023 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 # +import platform + from setuptools import Distribution, setup +GLIBC_VERSION = "2.17" -class BinaryDistribution(Distribution): - def has_ext_modules(self): - return True +def plat_name(): + return f"manylinux_{GLIBC_VERSION.replace('.', '_')}_{platform.machine()}" setup( - distclass=BinaryDistribution, + options={ + "bdist_wheel": { + "plat_name": f"{plat_name()}", + "python_tag": "py3", + } + } ) From 9ffddf907c2c394205eac7e662afe2f6d3ff0481 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 3 Sep 2024 14:56:04 -0700 Subject: [PATCH 2/3] Fix pre-commit --- .pre-commit-hooks/check_changelog_entries.py | 2 +- .pre-commit-hooks/copyright_headers.py | 2 +- src/relenv_gdb/build.py | 2 +- src/relenv_gdb/dbg.py | 2 +- src/relenv_gdb/gdbinit.py | 2 +- src/relenv_gdb/inject.py | 2 +- src/relenv_gdb/util.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-hooks/check_changelog_entries.py b/.pre-commit-hooks/check_changelog_entries.py index a7064f1..47680ae 100644 --- a/.pre-commit-hooks/check_changelog_entries.py +++ b/.pre-commit-hooks/check_changelog_entries.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2021-2023 VMware, Inc. +# Copyright 2021-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 # # pylint: skip-file diff --git a/.pre-commit-hooks/copyright_headers.py b/.pre-commit-hooks/copyright_headers.py index eb0fedb..aa65dee 100644 --- a/.pre-commit-hooks/copyright_headers.py +++ b/.pre-commit-hooks/copyright_headers.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2021-2023 VMware, Inc. +# Copyright 2021-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 # # pylint: disable=invalid-name,missing-module-docstring,missing-function-docstring diff --git a/src/relenv_gdb/build.py b/src/relenv_gdb/build.py index bee6c4b..2a74b6d 100644 --- a/src/relenv_gdb/build.py +++ b/src/relenv_gdb/build.py @@ -1,4 +1,4 @@ -# Copyright 2023 VMware, Inc. +# Copyright 2023-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 # """ diff --git a/src/relenv_gdb/dbg.py b/src/relenv_gdb/dbg.py index 3cf168a..e1c56d4 100755 --- a/src/relenv_gdb/dbg.py +++ b/src/relenv_gdb/dbg.py @@ -1,4 +1,4 @@ -# Copyright 2023 VMware, Inc. +# Copyright 2023-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 """ Use gdb to pull python stack traces a parent process and all of it's children. diff --git a/src/relenv_gdb/gdbinit.py b/src/relenv_gdb/gdbinit.py index ff57dcf..1ea9f1c 100644 --- a/src/relenv_gdb/gdbinit.py +++ b/src/relenv_gdb/gdbinit.py @@ -1,4 +1,4 @@ -# Copyright 2023 VMware, Inc. +# Copyright 2023-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 # """ diff --git a/src/relenv_gdb/inject.py b/src/relenv_gdb/inject.py index 8710f82..ff027fa 100644 --- a/src/relenv_gdb/inject.py +++ b/src/relenv_gdb/inject.py @@ -1,4 +1,4 @@ -# Copyright 2023 VMware, Inc. +# Copyright 2023-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 """ Inject python code into a running process. diff --git a/src/relenv_gdb/util.py b/src/relenv_gdb/util.py index 7db2940..2700498 100644 --- a/src/relenv_gdb/util.py +++ b/src/relenv_gdb/util.py @@ -1,4 +1,4 @@ -# Copyright 2023 VMware, Inc. +# Copyright 2023-2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 """ Utility methods. From ef73484b3f8ea6fd961f6f58fe222303dcc2243f Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 3 Sep 2024 15:40:16 -0700 Subject: [PATCH 3/3] fix pre-commit --- setup.py | 1 + src/relenv_gdb/build.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/setup.py b/setup.py index ef27867..aed0d11 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,7 @@ GLIBC_VERSION = "2.17" + def plat_name(): return f"manylinux_{GLIBC_VERSION.replace('.', '_')}_{platform.machine()}" diff --git a/src/relenv_gdb/build.py b/src/relenv_gdb/build.py index 2a74b6d..a673609 100644 --- a/src/relenv_gdb/build.py +++ b/src/relenv_gdb/build.py @@ -9,6 +9,7 @@ import pathlib import shutil import subprocess +import sys import tempfile import relenv.buildenv @@ -55,7 +56,11 @@ def build_gdb(prefix): ] = f"{os.environ['CPPFLAGS']} -I{os.environ['RELENV_PATH']}/include/ncursesw" import pprint + print("*" * 80) + print("** Environment") pprint.pprint(dict(os.environ)) + print("*" * 80) + sys.stdout.flush() with pushd(src / dir_name): subprocess.run(