<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository upt-macports.
</pre>
<p><a href="https://github.com/macports/upt-macports/commit/5a7841757469850dec9abb63d25377a039ae746e">https://github.com/macports/upt-macports/commit/5a7841757469850dec9abb63d25377a039ae746e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 5a7841757469850dec9abb63d25377a039ae746e
</span>Author: Renee Otten <reneeotten@macports.org>
AuthorDate: Mon May 9 21:08:39 2022 -0400
<span style='display:block; white-space:pre;color:#404040;'> python.Portfile: add test-phase if test dependencies are found
</span>---
upt_macports/templates/python.Portfile | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/upt_macports/templates/python.Portfile b/upt_macports/templates/python.Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index bd6e878..5098bfe 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/upt_macports/templates/python.Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/upt_macports/templates/python.Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,7 +41,22 @@ if {${name} ne ${subport}} {
</span> {%- if pkg.upt_pkg.requirements.test %}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- {{ depends('test', pkg.upt_pkg.requirements.test) -}}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {% endif -%}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {{ depends('test', pkg.upt_pkg.requirements.test) }}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # most test=suites are run using "pytest", if not then the lineb elow should
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # be modified (e.g., "nosetests-${python.branch}" or "${python.bin} -m unittest"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.cmd py.test-${python.branch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env PYTHONPATH=${worksrcpath}/build/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if the Python package is not "noarch" (i.e., something gets compiled),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # then line above should be replaced with the following block:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # pre-test {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {% else %}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {% endif %}
</span> }
{% endblock %}
</pre><pre style='margin:0'>
</pre>