<pre style='margin:0'>
Andrey Stromnov (stromnov) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/6f53591257a24e2d5ca3fcbb248dde62787545bd">https://github.com/macports/macports-ports/commit/6f53591257a24e2d5ca3fcbb248dde62787545bd</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 6f53591257a py-cryptography: update to 3.4.8 for legacy systems
</span>6f53591257a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 6f53591257a24e2d5ca3fcbb248dde62787545bd
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Sun Jun 23 12:24:03 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> py-cryptography: update to 3.4.8 for legacy systems
</span>---
python/py-cryptography/Portfile | 50 ++++++++++-----
.../py-cryptography/files/patch-build-no-rust.diff | 72 ++++++++++++++++++++++
python/py-cryptography/files/patch-openssl3.diff | 38 ++++++++++++
3 files changed, 143 insertions(+), 17 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-cryptography/Portfile b/python/py-cryptography/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index f74289bff3a..62d8723233a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-cryptography/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-cryptography/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -30,7 +30,7 @@ checksums ${distname}${extract.suffix} \
</span> # * https://ports.macports.org/port/rust/summary
set cryptography_darwin_min_ver 13
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${name} ne ${subport}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${name} ne ${subport} \
</span> && [string match "py*-${github.project}" ${subport}]} {
depends_build-append \
port:py${python.version}-setuptools
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -39,25 +39,46 @@ if {${name} ne ${subport}
</span> port:py${python.version}-cffi
# legacy support
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${python.version} eq 27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${python.version} eq 27 \
</span> || ${os.platform} eq "darwin" && ${os.major} < ${cryptography_darwin_min_ver}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- PortGroup openssl 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- github.setup pyca cryptography 3.3.2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PortGroup openssl 1.0
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- python.pep517 no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${python.version} eq 27} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Needs the same OpenSSL version as Python itself was built with.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openssl.branch 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup pyca cryptography 3.3.2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 13380349b4a5559153c1e8a328fd4629b81e134d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 2c8af64316fa1c09162c6e99dba9c23c76a07c3466dbbf62db8df970b45f935f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 35729139
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Build fails with OpenSSL 3; use 1.1 for now
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- openssl.branch 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-enum34 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-ipaddress
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup pyca cryptography 3.4.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 01ea4549ac0dc751bf7a81bfeb4b3c942303f254 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 cce7ee0b1082753df56c6bbbbe3c4122daba3b821b0d2129537d058624e67198 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 35736917
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # CRYPTOGRAPHY_DONT_BUILD_RUST is not respected by the build.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # So just remove Rust stuff from setup.py, it is optional in 3.4.x.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-build-no-rust.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # We do not want a build conflict with OpenSSL 3 here.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Thise version is easily fixable to build against it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-openssl3.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ python.pep517 no
</span>
description Legacy support of Python cryptography.
long_description {*}${description}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 13380349b4a5559153c1e8a328fd4629b81e134d \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 2c8af64316fa1c09162c6e99dba9c23c76a07c3466dbbf62db8df970b45f935f \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 35729139
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> if {${os.platform} eq "darwin" && ${os.major} < 11} {
# https://trac.macports.org/ticket/54519
patchfiles-append patch-src__cffi_src_build_openssl.py.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -69,11 +90,6 @@ if {${name} ne ${subport}
</span> depends_lib-append \
port:py${python.version}-six
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${python.version} eq 27} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:py${python.version}-enum34 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:py${python.version}-ipaddress
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> } else {
PortGroup rust 1.0
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-cryptography/files/patch-build-no-rust.diff b/python/py-cryptography/files/patch-build-no-rust.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..2ed323c5f7b
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-cryptography/files/patch-build-no-rust.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,72 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- setup.py 2021-08-25 01:01:04.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ setup.py 2024-06-23 11:42:01.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -10,22 +10,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from setuptools import find_packages, setup
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- from setuptools_rust import RustExtension
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-except ImportError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- =============================DEBUG ASSISTANCE==========================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- If you are seeing an error here please try the following to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- successfully install cryptography:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Upgrade to the latest pip and try again. This will fix errors for most
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- =============================DEBUG ASSISTANCE==========================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- raise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ base_dir = os.path.dirname(__file__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src_dir = os.path.join(base_dir, "src")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,27 +25,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # `install_requirements` and `setup_requirements` must be kept in sync with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # `pyproject.toml`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-setuptools_rust = "setuptools-rust>=0.11.4"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ install_requirements = ["cffi>=1.12"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-setup_requirements = install_requirements + [setuptools_rust]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++setup_requirements = install_requirements
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if os.environ.get("CRYPTOGRAPHY_DONT_BUILD_RUST"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rust_extensions = []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rust_extensions = [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- RustExtension(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "_rust",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "src/rust/Cargo.toml",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- py_limited_api=True,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # Enable abi3 mode if we're not using PyPy.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- features=(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if platform.python_implementation() == "PyPy"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else ["pyo3/abi3-py36"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rust_version=">=1.41.0",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with open(os.path.join(base_dir, "README.rst")) as f:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description = f.read()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -129,9 +95,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "twine >= 1.12.0",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "sphinxcontrib-spelling >= 4.0.1",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "sdist": [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- setuptools_rust,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "pep8test": [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "black",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "flake8",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -149,7 +112,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "src/_cffi_src/build_openssl.py:ffi",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "src/_cffi_src/build_padding.py:ffi",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- rust_extensions=rust_extensions,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except: # noqa: E722
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Note: This is a bare exception that re-raises so that we don't interfere
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-cryptography/files/patch-openssl3.diff b/python/py-cryptography/files/patch-openssl3.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e39eded5780
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-cryptography/files/patch-openssl3.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/_cffi_src/openssl/fips.py 2021-08-25 01:01:04.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/_cffi_src/openssl/fips.py 2024-06-23 11:54:00.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,6 +22,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int (*FIPS_mode_set)(int) = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int (*FIPS_mode)(void) = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static const long Cryptography_HAS_FIPS = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static const long Cryptography_HAS_FIPS = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int (*FIPS_mode_set)(int) = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int (*FIPS_mode)(void) = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/_cffi_src/openssl/err.py 2021-08-25 01:01:04.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/_cffi_src/openssl/err.py 2024-06-23 11:54:39.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -39,7 +39,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void ERR_put_error(int, int, int, const char *, int);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int ERR_GET_LIB(unsigned long);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-int ERR_GET_FUNC(unsigned long);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int ERR_GET_REASON(unsigned long);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/cryptography/hazmat/bindings/openssl/binding.py 2021-08-25 01:01:04.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/cryptography/hazmat/bindings/openssl/binding.py 2024-06-23 11:54:44.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,10 +43,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ err_lib = lib.ERR_GET_LIB(code)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- err_func = lib.ERR_GET_FUNC(code)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ err_reason = lib.ERR_GET_REASON(code)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- errors.append(_OpenSSLError(code, err_lib, err_func, err_reason))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ errors.append(_OpenSSLError(code, err_lib, err_reason))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return errors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>