<pre style='margin:0'>
Eric A. Borisch (eborisch) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/9de01ca750d640d671e92d3ee282adcc6739adbe">https://github.com/macports/macports-ports/commit/9de01ca750d640d671e92d3ee282adcc6739adbe</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 9de01ca750d py-clang/py-ctypeslib2: Update to latest (#18831)
</span>9de01ca750d is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 9de01ca750d640d671e92d3ee282adcc6739adbe
</span>Author: Eric A. Borisch <eborisch@gmail.com>
AuthorDate: Fri May 26 16:39:51 2023 -0500
<span style='display:block; white-space:pre;color:#404040;'> py-clang/py-ctypeslib2: Update to latest (#18831)
</span>---
python/py-clang/Portfile | 18 +++----
python/py-ctypeslib2/Portfile | 14 +++---
python/py-ctypeslib2/files/init_py.patch | 64 +++++++++++++++----------
python/py-ctypeslib2/files/pyproject.toml.patch | 18 +++++++
4 files changed, 74 insertions(+), 40 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-clang/Portfile b/python/py-clang/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index f007e06c385..b772de78e24 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-clang/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-clang/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -22,7 +22,7 @@ supported_archs noarch
</span>
livecheck.url https://api.github.com/repos/llvm/llvm-project/git/refs/tags
# Update this to the most recent clang supported
<span style='display:block; white-space:pre;background:#ffe0e0;'>-livecheck.version 15.0.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.version 16.0.4
</span> livecheck.regex {llvmorg-([\d.]+)\"}
if {${name} ne ${subport}} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,9 +34,9 @@ if {${name} ne ${subport}} {
</span> cfe-3.7.1.src.tar.xz \
rmd160 185b0f75970bc50682766a21794440578db87b5d \
sha256 56e2164c7c2a1772d5ed2a3e57485ff73ff06c97dff12edbeea1acc4412b0674 \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- clang-14.0.6.src.tar.xz \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rmd160 0e08ef630f183fd654247aeeb10d8fafee5e0814 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 2b5847b6a63118b9efe5c85548363c81ffe096b66c3b3675e953e26342ae4031 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clang-16.0.4.src.tar.xz \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 cca5ea9f1ebbbe810fd4994ae6e49b7a9ff39d3b \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 56f5797c20834769d4bf6c35b1677cebf31d27ad34d5c9b8d9f0237c1d11b51a \
</span> clang-15.0.7.src.tar.xz \
rmd160 4ac977bfd5dbe3c7f55b0cfebbd9420a737bcb65 \
sha256 a6b673ef15377fb46062d164e8ddc4d05c348ff8968f015f7f4af03f51000067
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,8 +44,8 @@ if {${name} ne ${subport}} {
</span> depends_build-append port:py${python.version}-setuptools
# Keeping 37 around for old systems; otherwise two latest releases.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set clanglist {37 14 15}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set clangvlist {3.7.1 14.0.6 15.0.7}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set clanglist {37 16 15}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set clangvlist {3.7.1 16.0.4 15.0.7}
</span>
foreach cvnum $clanglist {
# Explictly use (and depend on) the libclang we select during install
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -90,8 +90,8 @@ if {${name} ne ${subport}} {
</span>
if {![variant_isset clang37] &&
![variant_isset clang15] &&
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ![variant_isset clang14]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants +clang15
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ![variant_isset clang16]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants +clang16
</span> }
pre-extract {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -99,7 +99,7 @@ if {${name} ne ${subport}} {
</span> # they will have the default variant set above.
if {![variant_isset clang37] &&
![variant_isset clang15] &&
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ![variant_isset clang14]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ![variant_isset clang16]} {
</span> ui_error "At least one of the clangNN variants must be active."
return -code error "Unsupported (no) variants selected."
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-ctypeslib2/Portfile b/python/py-ctypeslib2/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index beaeef7428b..f64ecf3fe85 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-ctypeslib2/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-ctypeslib2/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,7 +4,7 @@ PortSystem 1.0
</span> PortGroup python 1.0
PortGroup github 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-github.setup trolldbois ctypeslib 2.3.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup trolldbois ctypeslib 2.3.4
</span> name py-ctypeslib2
revision 0
python.versions 37 38 39 310 311
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -21,16 +21,16 @@ long_description This fork of ctypeslib is mainly about using the \
</span> code from C source code, instead of gccxml.
checksums \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- rmd160 35075d7355e5566391396dc879b33bcf1748bee1 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 4e4a1c74f71f87f8bf685708529d066d9f361303f33035a8059da205b44b3cf6 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 90571
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 def394256eb62dd568fe2a5a550794d18287e9f1 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 0a7b7b8cf502034d303f37729a9b1c43fa23659e9a4095cbea01cfdd0fe2a16c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 93093
</span>
if {${name} ne ${subport}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:py${python.version}-setuptools
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append port:py${python.version}-clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:py${python.version}-setuptools \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-clang
</span>
# Use the libclang that is provided by pyXX-clang (via its +clangY variant)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles init_py.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles init_py.patch pyproject.toml.patch
</span>
post-destroot {
set DOCDIR ${destroot}${prefix}/share/doc/${subport}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-ctypeslib2/files/init_py.patch b/python/py-ctypeslib2/files/init_py.patch
</span><span style='display:block; white-space:pre;color:#808080;'>index b34ead11f61..2daa19fcb1a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-ctypeslib2/files/init_py.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-ctypeslib2/files/init_py.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,53 +1,69 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- ctypeslib/__init__.py.orig 2023-04-14 19:52:56.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ ctypeslib/__init__.py 2023-04-24 12:29:20.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -24,32 +24,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ctypeslib/__init__.py.orig 2023-04-24 19:30:48
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ctypeslib/__init__.py 2023-05-26 16:13:39
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,33 +32,6 @@
</span> __version__ = __dist.version
-def __find_clang_libraries():
- """ configure python-clang to use the local clang library """
- _libs = []
<span style='display:block; white-space:pre;background:#e0ffe0;'>+- # try for a file with a version match with the clang python package version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- version_major = __clang_py_version__.split('.')[0]
</span> - # try default system name
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- v0 = ["libclang", "clang"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v_list = [f"clang-{__clang_py_version__}", f"clang-{version_major}", "libclang", "clang"]
</span> - # tries clang version 16 to 7
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- v1 = ["clang-%d" % _ for _ in range(16, 6, -1)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v_list += [f"clang-{_}" for _ in range(16, 6, -1)]
</span> - # with the dotted form of clang 6.0 to 4.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- v2 = ["clang-%.1f" % _ for _ in range(6, 3, -1)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v_list += [f"clang-{_:.1f}" for _ in range(6, 3, -1)]
</span> - # clang 3 supported versions
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- v3 = ["clang-3.9", "clang-3.8", "clang-3.7"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- v_list = v0 + v1 + v2 + v3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v_list += ["clang-3.9", "clang-3.8", "clang-3.7"]
</span> - for _version in v_list:
- _filename = find_library(_version)
- if _filename:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- _libs.append((_version, _filename))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _libs.append(_filename)
</span> - # On darwin, also consider either Xcode or CommandLineTools.
- if os.name == "posix" and sys.platform == "darwin":
- for _ in ['/Library/Developer/CommandLineTools/usr/lib/libclang.dylib',
- '/Applications/Xcode.app/Contents/Frameworks/libclang.dylib',
- ]:
- if os.path.exists(_):
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- _libs.insert(0, (_, _))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _libs.insert(0, _)
</span> - return _libs
-
-
def clang_version():
"""Pull the clang C library version from the API"""
# avoid loading the cindex API (cindex.conf.lib) to avoid version conflicts
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -72,18 +46,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -79,33 +52,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> def __configure_clang_cindex():
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global __clang_py_version__
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- __clang_py_version__ = get_distribution('clang').version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- # first try for a perfect match.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- __lib_filename = find_library("clang-" + __clang_py_version__)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if __lib_filename is not None:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- cindex.Config.set_library_file(__lib_filename)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return __lib_filename
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- else:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- __libs = __find_clang_libraries()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- if len(__libs) > 0:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- __version, __filename = __libs[0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- cindex.Config.set_library_file(__filename)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return __filename
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- First we attempt to configure clang with the library path set in environment variable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Second we attempt to configure clang with a clang library version similar to the clang python package version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Third we attempt to configure clang with any clang library we can find
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # first, use environment variables set by user
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __libs = []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __lib_path = os.environ.get('CLANG_LIBRARY_PATH')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if __lib_path is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if not os.path.exists(__lib_path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- warnings.warn("Filepath in CLANG_LIBRARY_PATH does not exist", RuntimeWarning)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __libs.append(__lib_path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __libs.extend(__find_clang_libraries())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for __library_path in __libs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if os.path.isdir(__library_path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cindex.Config.set_library_path(__library_path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cindex.Config.set_library_file(__library_path)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # force-check that clang is configured properly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- clang_version()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- except cindex.LibclangError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- warnings.warn(f"Could not configure clang with library_path={__library_path}", RuntimeWarning)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- continue
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return __library_path
</span> - return None
+ # The (MacPorts) installed clang module already knows (and depends upon)
+ # the appropriate libclang; don't go searching for something else.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-ctypeslib2/files/pyproject.toml.patch b/python/py-ctypeslib2/files/pyproject.toml.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..bab15f803be
</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-ctypeslib2/files/pyproject.toml.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- pyproject.toml.orig 2023-05-15 14:29:19.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ pyproject.toml 2023-05-15 14:29:31.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [build-system]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-requires = ["setuptools>=56.2", "setuptools_scm[toml]>=7"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++requires = ["setuptools>=56.2"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build-backend = "setuptools.build_meta"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [project]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -38,8 +38,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "data/structure_type.tpl",
</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;'>+-[tool.setuptools_scm]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [tool.black]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ line-length = 120
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target-version = ['py37']
</span></pre><pre style='margin:0'>
</pre>