From dc694bde3833216f47d848c52bf5c0575e6e32cf Mon Sep 17 00:00:00 2001 From: matthew16550 Date: Mon, 18 Nov 2024 16:20:43 +1300 Subject: [PATCH] py-mitmproxy*: update to 11.0.2 --- python/py-mitmproxy/Portfile | 31 +++++++-------- .../files/patch-test_version.py.diff | 10 ----- python/py-mitmproxy_macos/Portfile | 34 +++++++++++++++++ python/py-mitmproxy_rs/Portfile | 38 +++++++++++++++++++ 4 files changed, 86 insertions(+), 27 deletions(-) delete mode 100644 python/py-mitmproxy/files/patch-test_version.py.diff create mode 100644 python/py-mitmproxy_macos/Portfile create mode 100644 python/py-mitmproxy_rs/Portfile diff --git a/python/py-mitmproxy/Portfile b/python/py-mitmproxy/Portfile index 37d31e9ad0c27..70bdf919d9b4d 100644 --- a/python/py-mitmproxy/Portfile +++ b/python/py-mitmproxy/Portfile @@ -4,8 +4,7 @@ PortSystem 1.0 PortGroup python 1.0 PortGroup github 1.0 - -github.setup mitmproxy mitmproxy 7.0.4 v +github.setup mitmproxy mitmproxy 11.0.2 v revision 0 name py-${github.project} @@ -26,33 +25,31 @@ long_description \ homepage https://mitmproxy.org/ -checksums rmd160 7668d0fe20ad33e026de91345ceb966d408f4774 \ - sha256 d7d7636e2c2c2d957e413fdd54fd5be35f9128287601df5e8a971865d186fffe \ - size 27312057 - -patchfiles patch-test_version.py.diff +checksums rmd160 74c695393f3aaab519fa268d0720936092424473 \ + sha256 2e67521b00970997f101c15a598d17ad0440411d1cd2c978879791c73e4251ce \ + size 31029542 -python.versions 39 310 311 +# mitmproxy supports 312 & 313 but currently some deps do not :-( +python.versions 310 311 if {${name} ne ${subport}} { - depends_lib-append port:py${python.version}-asn1 \ + depends_lib-append port:py${python.version}-aioquic \ port:py${python.version}-asgiref \ - port:py${python.version}-blinker \ port:py${python.version}-brotli \ - port:py${python.version}-click \ port:py${python.version}-certifi \ port:py${python.version}-cryptography \ port:py${python.version}-flask \ + port:py${python.version}-h11 \ port:py${python.version}-h2 \ port:py${python.version}-hyperframe \ port:py${python.version}-kaitaistruct \ port:py${python.version}-ldap3 \ + port:py${python.version}-mitmproxy_rs \ port:py${python.version}-msgpack \ port:py${python.version}-openssl \ port:py${python.version}-parsing \ port:py${python.version}-passlib \ port:py${python.version}-publicsuffix2 \ - port:py${python.version}-protobuf3 \ port:py${python.version}-pyperclip \ port:py${python.version}-ruamel-yaml \ port:py${python.version}-ruamel-yaml-clib \ @@ -64,17 +61,17 @@ if {${name} ne ${subport}} { # Testing dependencies depends_test-append port:py${python.version}-pytest \ - port:py${python.version}-asynctest \ - port:py${python.version}-beautifulsoup4 \ port:py${python.version}-hypothesis \ port:py${python.version}-pytest-asyncio \ - port:py${python.version}-tz \ - port:py${python.version}-parver \ port:py${python.version}-requests + if {${python.version} < 311} { + depends_lib-append port:py${python.version}-typing_extensions + } + post-patch { # Remove all upper bounds - potential breakings are detected by test - reinplace "s/, *<\[0-9=.\]*//" ${worksrcpath}/setup.py + reinplace "s/, *<\[0-9=.\]*//" ${worksrcpath}/pyproject.toml } test.run yes diff --git a/python/py-mitmproxy/files/patch-test_version.py.diff b/python/py-mitmproxy/files/patch-test_version.py.diff deleted file mode 100644 index 2d7a65a41ac33..0000000000000 --- a/python/py-mitmproxy/files/patch-test_version.py.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- test/mitmproxy/test_version.py.old 2020-08-02 12:01:29.000000000 +0200 -+++ test/mitmproxy/test_version.py 2020-08-02 12:00:02.000000000 +0200 -@@ -20,6 +20,7 @@ - version.VERSION = "3.0.0rc2" - - with mock.patch('subprocess.check_output') as m: -+ with mock.patch('subprocess.run') as do_not_fail: - m.return_value = b"tag-0-cafecafe" - assert version.get_dev_version() == "3.0.0rc2" - diff --git a/python/py-mitmproxy_macos/Portfile b/python/py-mitmproxy_macos/Portfile new file mode 100644 index 0000000000000..cba46c155bd16 --- /dev/null +++ b/python/py-mitmproxy_macos/Portfile @@ -0,0 +1,34 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 + +PortSystem 1.0 +PortGroup python 1.0 + +name py-mitmproxy_macos +version 0.11.2 +revision 0 + +license MIT +maintainers nomaintainer +supported_archs arm64 x86_64 + +description Precompiled binaries used by Mitmproxy +long_description {*}${description}, provides Local Redirect Mode and automates the certificate trust process. \ + See https://mitmproxy.org/posts/local-redirect/macos/ + +homepage https://mitmproxy.org/ + +master_sites https://files.pythonhosted.org/packages/2e/8f/0c7115979f756945bea0c7c9ddf31b5be98069dc87848a237b020462ed6f/ +distname mitmproxy_macos-${version}-py3-none-any + +checksums rmd160 50f64257a2409f8e412384acf152887aeba9ca05 \ + sha256 1711554a70e294a9dbcb6e332c1d5695b46dedde11c8bebc00ea60aaea70639c \ + size 2654010 + +extract.suffix .whl +extract.only + +python.versions 310 311 312 313 + +build {} + +destroot.target ${distpath}/${distfiles} diff --git a/python/py-mitmproxy_rs/Portfile b/python/py-mitmproxy_rs/Portfile new file mode 100644 index 0000000000000..ff09ad4dac791 --- /dev/null +++ b/python/py-mitmproxy_rs/Portfile @@ -0,0 +1,38 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 + +PortSystem 1.0 +PortGroup python 1.0 + +name py-mitmproxy_rs +version 0.11.2 +revision 0 + +license MIT +maintainers nomaintainer +supported_archs arm64 x86_64 + +description "Rust bits" for Mitmproxy +long_description {*}${description}, most notably WireGuard Mode and Local Redirect Mode. + +homepage https://mitmproxy.org/ + +master_sites https://files.pythonhosted.org/packages/0a/b9/fc824f3c05a88b371997160968a91ebe64ea3b1f4b0e68a3443f395f3b59/ +distname mitmproxy_rs-${version}-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2 + +checksums rmd160 3b052ed68a153a2955e2d6785f008d052f53cc37 \ + sha256 fa26b9abf8a126e0ec442aac676996f9f90c3a40926621611cf3f09764c4a7ec \ + size 3721203 + +extract.suffix .whl +extract.only + +python.versions 310 311 312 313 + +build {} + +destroot.target ${distpath}/${distfiles} + +if {${name} ne ${subport}} { + depends_run-append \ + port:py${python.version}-mitmproxy_macos +}