<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ffa653d8101785d3439814d6e0a62eb614fac777">https://github.com/macports/macports-ports/commit/ffa653d8101785d3439814d6e0a62eb614fac777</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit ffa653d8101785d3439814d6e0a62eb614fac777
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Dec 1 12:59:50 2020 +1100
<span style='display:block; white-space:pre;color:#404040;'> py-pep517: new port
</span>---
python/py-pep517/Portfile | 29 ++++++++++++++
python/py-pep517/files/no-deps-option.diff | 63 ++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pep517/Portfile b/python/py-pep517/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..77afbdab721
</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-pep517/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,29 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- 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
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup python 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name py-pep517
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 0.9.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {jmr @jmroot} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description API to call PEP 517 hooks
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://pypi.python.org/pypi/pep517/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums md5 79c1d01d7b67a52b2361dcd38a587c13 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 085fcb66443ec0c3c4dc455fce433989b54ad54c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 aeb78601f2d1aa461960b43add204cc7955667687fbcf9cdb5170f00556f117f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+python.versions 37 38 39
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {$subport ne $name} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:py${python.version}-toml
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles no-deps-option.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ livecheck.type none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-pep517/files/no-deps-option.diff b/python/py-pep517/files/no-deps-option.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..84049a8c1e7
</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-pep517/files/no-deps-option.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,63 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- pep517/build.py.orig 2020-10-19 07:41:27.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ pep517/build.py 2020-12-01 12:49:53.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -55,14 +55,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return system
</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;'>+-def _do_build(hooks, env, dist, dest):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def _do_build(hooks, env, dist, dest, no_deps=False):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ get_requires_name = 'get_requires_for_build_{dist}'.format(**locals())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ get_requires = getattr(hooks, get_requires_name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reqs = get_requires({})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ log.info('Got build requires: %s', reqs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- env.pip_install(reqs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- log.info('Installed dynamic build dependencies')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if not no_deps:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ env.pip_install(reqs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ log.info('Installed dynamic build dependencies')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with tempdir() as td:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ log.info('Trying to build %s in %s', dist, td)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -73,7 +74,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shutil.move(source, os.path.join(dest, os.path.basename(filename)))
</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;'>+-def build(source_dir, dist, dest=None, system=None):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def build(source_dir, dist, dest=None, system=None, no_deps=False):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system = system or load_system(source_dir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dest = os.path.join(source_dir, dest or 'dist')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mkdir_p(dest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -84,8 +85,9 @@
</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 BuildEnvironment() as env:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- env.pip_install(system['requires'])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _do_build(hooks, env, dist, dest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if not no_deps:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ env.pip_install(system['requires'])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _do_build(hooks, env, dist, dest, no_deps=no_deps)
</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;'>+ parser = argparse.ArgumentParser()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -104,6 +106,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default=False,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parser.add_argument(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ '--no-deps', '-n',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ action='store_true',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default=False,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++parser.add_argument(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ '--out-dir', '-o',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ help="Destination in which to save the builds relative to source dir",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -117,7 +124,7 @@
</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;'>+ for dist in dists:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- build(args.source_dir, dist, args.out_dir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ build(args.source_dir, dist, args.out_dir, no_deps=args.no_deps)
</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;'>+ if __name__ == '__main__':
</span></pre><pre style='margin:0'>
</pre>