<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/db97330bad399999d7439b79c72e3ac69e55ec0b">https://github.com/macports/macports-ports/commit/db97330bad399999d7439b79c72e3ac69e55ec0b</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 db97330bad3 py-ctypeslib2: Don't search; use depended-upon libclang. (#11140)
</span>db97330bad3 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit db97330bad399999d7439b79c72e3ac69e55ec0b
</span>Author: Eric A. Borisch <borisch.eric@mayo.edu>
AuthorDate: Tue May 25 13:42:38 2021 -0500
<span style='display:block; white-space:pre;color:#404040;'> py-ctypeslib2: Don't search; use depended-upon libclang. (#11140)
</span>---
python/py-ctypeslib2/Portfile | 6 +++++-
python/py-ctypeslib2/files/init_py.patch | 33 ++++++++++++++++++++++----------
2 files changed, 28 insertions(+), 11 deletions(-)
<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 29aac16a80f..bca2fcf582b 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;'>@@ -6,6 +6,7 @@ PortGroup github 1.0
</span>
github.setup trolldbois ctypeslib 2.3.2
name py-ctypeslib2
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> python.versions 37 38 39
python.default_version 39
platforms darwin
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,6 +30,9 @@ if {${name} ne ${subport}} {
</span> depends_build-append port:py${python.version}-setuptools
depends_lib-append port:py${python.version}-clang
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Use the libclang that is provided by pyXX-clang (via its +clangY variant)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles init_py.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-destroot {
set DOCDIR ${destroot}${prefix}/share/doc/${subport}
xinstall -d ${DOCDIR}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -38,7 +42,7 @@ if {${name} ne ${subport}} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach {old} {34 35 36} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach {old} {27 34 35 36} {
</span> subport py${old}-${python.rootname} "
replaced_by py${python.default_version}-${python.rootname}
PortGroup obsolete 1.0
<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 e72559eef66..1865ccff3bb 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,18 +1,31 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- ctypeslib/__init__.py.orig 2018-04-02 16:24:35.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ ctypeslib/__init__.py 2018-04-02 16:25:16.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -20,13 +20,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # configure python-clang to use the local clang library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ctypeslib/__init__.py.orig 2021-05-25 09:57:00.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ctypeslib/__init__.py 2021-05-25 09:59:28.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -23,24 +23,11 @@
</span> try:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- from ctypes.util import find_library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from ctypes.util import find_library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from clang import cindex
</span> - # debug for python-haystack travis-ci
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- for version in ["libclang", "clang", "clang-6.0", "clang-5.0", "clang-4.0", "clang-3.9", "clang-3.8", "clang-3.7"]:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v1 = ["clang-%d" % _ for _ in range(14, 6, -1)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v2 = ["clang-%.1f" % _ for _ in range(6, 3, -1)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- v_list = v1 + v2 + ["clang-3.9", "clang-3.8", "clang-3.7"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for version in ["libclang", "clang"] + v_list:
</span> - if find_library(version) is not None:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-- from clang import cindex
</span> - cindex.Config.set_library_file(find_library(version))
- break
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ from clang import cindex
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ cindex.Config.set_library_file("%%LIBCLANG%%")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if os.name == "posix" and sys.platform == "darwin":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # On darwin, consider either Xcode or CommandLineTools.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for f in ['/Applications/Xcode.app/Contents/Frameworks/libclang.dylib',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- '/Library/Developer/CommandLineTools/usr/lib/libclang.dylib']:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if os.path.exists(f):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cindex.Config.set_library_file(f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # The (MacPorts) installed clang module already knows (and depends upon)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # the appropriate libclang; don't go searching for something else.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def clang_version():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return cindex.Config.library_file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cfg = cindex.Config()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return cfg.get_filename()
</span> except ImportError as e:
print(e)
</pre><pre style='margin:0'>
</pre>