From d81c53ac3bec9b3556b0965e8fe28822937af2ff Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 14:56:46 +0100 Subject: [PATCH 1/7] added environment variables for openssl --- setup.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 8d7ad8c9..160a4702 100644 --- a/setup.py +++ b/setup.py @@ -80,16 +80,25 @@ def run(self): def main(): """Python extension build entrypoint.""" cwd = Path.cwd() + # Use ZOPEN_ROOTFS to find OpenSSL and ZOSLIB. - if "ZOPEN_ROOTFS" not in os.environ: + if "ZOPEN_ROOTFS" not in os.environ and not ("zoslib" in os.environ["PATH"] and "OPENSSL_ROOT" in os.environ): raise RuntimeError( "ZOPEN_ROOTFS is not set, but is required in order to " + "find the zopen community distributions of of OpenSSL " + "and ZOSLIB since they are build dependencies.\n" + "You can find more information about setting up zopen " + "community here: " - + "https://zopen.community/#/Guides/QuickStart?id=installing-zopen-package-manager", + + "https://zopen.community/#/Guides/QuickStart?id=installing-zopen-package-manager \n" + + "Alternatively set ZOSLIB_ROOT or OPENSSL_ROOT", ) + if "ZOPEN_ROOTFS" not in os.environ: + openssl_lib_path = os.environ["OPENSSL_ROOT"] + "/lib/" + openssl_include_path = os.environ["OPENSSL_ROOT"] + "/include/" + else: + openssl_lib_path = os.environ["ZOPEN_ROOTFS"] + "/usr/local/lib/" + openssl_include_path = os.environ["ZOPEN_ROOTFS"] + "/usr/local/include/" + assembled_object_path = cwd / "artifacts" / "irrseq00.o" generate_json_schema_header() setup_args = { @@ -109,15 +118,15 @@ def main(): "externals/json", "externals/json-schema-validator", "externals/iconv", - os.environ["ZOPEN_ROOTFS"] + "/usr/local/include", + openssl_include_path, ] ), extra_link_args=[ "-m64", "-Wl,-b,edit=no", - "-Wl," + os.environ["ZOPEN_ROOTFS"] + "/usr/local/lib/libcrypto.a", - "-Wl," + os.environ["ZOPEN_ROOTFS"] + "/usr/local/lib/libssl.a", - "-Wl," + os.environ["ZOPEN_ROOTFS"] + "/usr/local/lib/libzoslib.a", + "-Wl," + openssl_lib_path + "libcrypto.a", + "-Wl," + openssl_lib_path + "libssl.a", + "-Wl," + openssl_lib_path + "libzoslib.a", ], extra_objects=[f"{assembled_object_path}"], ), From bd2b3dd67f8d17b881dbe8e08fa78856cd286214 Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 15:06:16 +0100 Subject: [PATCH 2/7] Ignore line length --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 160a4702..8b663a08 100644 --- a/setup.py +++ b/setup.py @@ -82,14 +82,14 @@ def main(): cwd = Path.cwd() # Use ZOPEN_ROOTFS to find OpenSSL and ZOSLIB. - if "ZOPEN_ROOTFS" not in os.environ and not ("zoslib" in os.environ["PATH"] and "OPENSSL_ROOT" in os.environ): + if "ZOPEN_ROOTFS" not in os.environ and not ("zoslib" in os.environ["PATH"] and "OPENSSL_ROOT" in os.environ): # noqa: E501 raise RuntimeError( "ZOPEN_ROOTFS is not set, but is required in order to " + "find the zopen community distributions of of OpenSSL " + "and ZOSLIB since they are build dependencies.\n" + "You can find more information about setting up zopen " + "community here: " - + "https://zopen.community/#/Guides/QuickStart?id=installing-zopen-package-manager \n" + + "https://zopen.community/#/Guides/QuickStart?id=installing-zopen-package-manager \n" # noqa: E501 + "Alternatively set ZOSLIB_ROOT or OPENSSL_ROOT", ) if "ZOPEN_ROOTFS" not in os.environ: From cd1cb0feb848066343b200b679b05e35e6ac66fb Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 15:16:20 +0100 Subject: [PATCH 3/7] Fixed zoslib not being found --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8b663a08..60346b34 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ def main(): cwd = Path.cwd() # Use ZOPEN_ROOTFS to find OpenSSL and ZOSLIB. - if "ZOPEN_ROOTFS" not in os.environ and not ("zoslib" in os.environ["PATH"] and "OPENSSL_ROOT" in os.environ): # noqa: E501 + if "ZOPEN_ROOTFS" not in os.environ and not ("ZOSLIB_ROOT" in os.environ and "OPENSSL_ROOT" in os.environ): # noqa: E501 raise RuntimeError( "ZOPEN_ROOTFS is not set, but is required in order to " + "find the zopen community distributions of of OpenSSL " @@ -94,10 +94,12 @@ def main(): ) if "ZOPEN_ROOTFS" not in os.environ: openssl_lib_path = os.environ["OPENSSL_ROOT"] + "/lib/" + zoslib_lib_path = os.environ["ZOSLIB_ROOT"] + "/lib/" openssl_include_path = os.environ["OPENSSL_ROOT"] + "/include/" else: openssl_lib_path = os.environ["ZOPEN_ROOTFS"] + "/usr/local/lib/" openssl_include_path = os.environ["ZOPEN_ROOTFS"] + "/usr/local/include/" + zoslib_lib_path = os.environ["ZOSLIB_ROOT"] + "/usr/local/lib/" assembled_object_path = cwd / "artifacts" / "irrseq00.o" generate_json_schema_header() @@ -126,7 +128,7 @@ def main(): "-Wl,-b,edit=no", "-Wl," + openssl_lib_path + "libcrypto.a", "-Wl," + openssl_lib_path + "libssl.a", - "-Wl," + openssl_lib_path + "libzoslib.a", + "-Wl," + zoslib_lib_path + "libzoslib.a", ], extra_objects=[f"{assembled_object_path}"], ), From 9ee41afa2d9e34189387e00aedd57d115e08149c Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 15:23:02 +0100 Subject: [PATCH 4/7] Ignore shell files --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cb0e3bd2..fb54df09 100644 --- a/.gitignore +++ b/.gitignore @@ -223,4 +223,9 @@ sear_schema.hpp # Python wheels -*.whl \ No newline at end of file +*.whl + +# Shell stuff + +*.ps1 +*.sh \ No newline at end of file From 9fc882c7356dd4421d59b2d1b479f95857f7d35f Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 15:37:41 +0100 Subject: [PATCH 5/7] Organization change --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 60346b34..bd169629 100644 --- a/setup.py +++ b/setup.py @@ -94,8 +94,8 @@ def main(): ) if "ZOPEN_ROOTFS" not in os.environ: openssl_lib_path = os.environ["OPENSSL_ROOT"] + "/lib/" - zoslib_lib_path = os.environ["ZOSLIB_ROOT"] + "/lib/" openssl_include_path = os.environ["OPENSSL_ROOT"] + "/include/" + zoslib_lib_path = os.environ["ZOSLIB_ROOT"] + "/lib/" else: openssl_lib_path = os.environ["ZOPEN_ROOTFS"] + "/usr/local/lib/" openssl_include_path = os.environ["ZOPEN_ROOTFS"] + "/usr/local/include/" From d7d685bc965a219d163ea3efa4a1d5c25d049f96 Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 15:38:08 +0100 Subject: [PATCH 6/7] Formatting --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index bd169629..35f3af2d 100644 --- a/setup.py +++ b/setup.py @@ -92,6 +92,7 @@ def main(): + "https://zopen.community/#/Guides/QuickStart?id=installing-zopen-package-manager \n" # noqa: E501 + "Alternatively set ZOSLIB_ROOT or OPENSSL_ROOT", ) + if "ZOPEN_ROOTFS" not in os.environ: openssl_lib_path = os.environ["OPENSSL_ROOT"] + "/lib/" openssl_include_path = os.environ["OPENSSL_ROOT"] + "/include/" From c92d3fc3f7ed94fc5b883629c0bb6088cecb3b7d Mon Sep 17 00:00:00 2001 From: Emma Skovgaard Date: Wed, 11 Feb 2026 15:44:57 +0100 Subject: [PATCH 7/7] Fixed misleading message --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 35f3af2d..7261fd43 100644 --- a/setup.py +++ b/setup.py @@ -90,9 +90,9 @@ def main(): + "You can find more information about setting up zopen " + "community here: " + "https://zopen.community/#/Guides/QuickStart?id=installing-zopen-package-manager \n" # noqa: E501 - + "Alternatively set ZOSLIB_ROOT or OPENSSL_ROOT", + + "Alternatively set ZOSLIB_ROOT and OPENSSL_ROOT", ) - + if "ZOPEN_ROOTFS" not in os.environ: openssl_lib_path = os.environ["OPENSSL_ROOT"] + "/lib/" openssl_include_path = os.environ["OPENSSL_ROOT"] + "/include/"