<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-contrib.

</pre>
<p><a href="https://github.com/macports/macports-contrib/commit/67e1d8f28473d186d7a64cbabc45c3a2f1f5dfec">https://github.com/macports/macports-contrib/commit/67e1d8f28473d186d7a64cbabc45c3a2f1f5dfec</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 67e1d8f28473d186d7a64cbabc45c3a2f1f5dfec
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Jun 20 17:30:08 2023 +1000

<span style='display:block; white-space:pre;color:#404040;'>    pypi2port: indicate pure python packages
</span>---
 pypi2port/pypi2port.py | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/pypi2port/pypi2port.py b/pypi2port/pypi2port.py
</span><span style='display:block; white-space:pre;color:#808080;'>index 227820e..7232ea6 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/pypi2port/pypi2port.py
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/pypi2port/pypi2port.py
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -342,6 +342,20 @@ def search_license(license):
</span>           if match:
                        return licenses[i]
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+def is_purepython(pkg_name, pkg_version):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    Return True if the specified package is pure Python, or False if it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    contains native code.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    urls = get_release_urls(pkg_name, pkg_version)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    for url in urls:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if url['packagetype'] == 'bdist_wheel':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            if url['filename'].endswith('-none-any.whl'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                return False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    return False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> 
 def port_testing(name, portv='38'):
        """ Port Testing function for various phase implementations """
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -479,7 +493,9 @@ def create_portfile(dict, file_name, dict2):
</span>           file.write('name                py-{0}\n'.format(dict['name']))
                file.write('version             {0}\n'.format(dict['version']))
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                file.write('platforms           darwin\n')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           if is_purepython(dict['name'], dict['version']):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   file.write('platforms           {darwin any}\n')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   file.write('supported_archs     noarch\n')
</span>           license = dict['license']
                license = search_license(license)
                file.write('license             {0}\n'.format(license))
</pre><pre style='margin:0'>

</pre>