<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/d2848cc9f23626b83e11582093542c09a84208fb">https://github.com/macports/macports-ports/commit/d2848cc9f23626b83e11582093542c09a84208fb</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 d2848cc9f23 py-magenta: Bugfix, remove outdated patch files, fix tests
</span>d2848cc9f23 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit d2848cc9f23626b83e11582093542c09a84208fb
</span>Author: Steven Thomas Smith <s.t.smith@ieee.org>
AuthorDate: Sun Mar 28 17:54:00 2021 -0400
<span style='display:block; white-space:pre;color:#404040;'> py-magenta: Bugfix, remove outdated patch files, fix tests
</span>---
python/py-magenta/Portfile | 18 +++++---
python/py-magenta/files/patch-setup.py.diff | 67 +++++++++++++++++++++++++++++
python/py-magenta/files/setup.cfg.patch | 8 ----
python/py-magenta/files/setup.py.patch | 13 ------
4 files changed, 80 insertions(+), 26 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-magenta/Portfile b/python/py-magenta/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 7ecf3f1454c..8cb21afa814 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-magenta/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-magenta/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -71,18 +71,17 @@ if {${name} ne ${subport}} {
</span> port:sox
depends_test-append \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-pydub \
</span> port:py${python.version}-pytest \
port:py${python.version}-pytest-xdist
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # diff -NaurdwB ./py-magenta-orig/setup.py ./py-magenta-new/setup.py | sed -E -e 's/\.\/py-magenta-(orig|new)*\/(setup\.py)(\.[[:alnum:]]+)*/\.\/setup.py/' > ./setup.py.patch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles setup.cfg.patch \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- setup.py.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # diff -NaurdwB ./setup.py ./patch-setup.py | sed -E -e 's|patch-||' > ./patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles patch-setup.py.diff \
</span>
test.run yes
test.cmd py.test-${python.branch}
test.target
<span style='display:block; white-space:pre;background:#ffe0e0;'>- test.env-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- PYTHONPATH=${worksrcpath}/build/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env-append PYTHONPATH=${worksrcpath}/build/lib
</span>
post-destroot {
set docdir ${prefix}/share/doc/${subport}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -91,5 +90,14 @@ if {${name} ne ${subport}} {
</span> ${destroot}${docdir}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes "One example Magenta application is piano transcription:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+onsets_frames_transcription_transcribe-${python.branch} --model_dir=path/to/maestro_checkpoint piano_recording.wav
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+See:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* https://github.com/magenta/magenta/tree/master/magenta/models/onsets_frames_transcription
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* https://storage.googleapis.com/magentadata/models/onsets_frames_transcription/maestro_checkpoint.zip
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> livecheck.type none
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-magenta/files/patch-setup.py.diff b/python/py-magenta/files/patch-setup.py.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..73a1928ccd4
</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-magenta/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,67 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./setup.py 2021-03-28 18:35:09.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./setup.py 2021-03-28 18:39:27.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -24,36 +24,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with open('magenta/version.py') as in_file:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exec(in_file.read()) # pylint: disable=exec-used
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# turn off requirements to avoid "distribution was not found and is required" issues
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# these requirements are provided by `port file py-magenta`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ REQUIRED_PACKAGES = [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'absl-py',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'dm-sonnet',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'absl-py',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'dm-sonnet',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # tensor2tensor has a dependency on dopamine-rl, which we don't use.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # pin to a version that doesn't require pygame installation because that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # has too many external non-python dependencies.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'dopamine-rl <= 3.0.1',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'imageio',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'librosa >= 0.6.2, < 0.8.0',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'matplotlib >= 1.5.3',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'mido == 1.2.6',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'mir_eval >= 0.4',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'note-seq',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'numba < 0.50', # temporary fix for librosa import
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'numpy',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'Pillow >= 3.4.2',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'pretty_midi >= 0.2.6',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'pygtrie >= 2.3',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'python-rtmidi >= 1.1, < 1.2', # 1.2 breaks us
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'scikit-image',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'scipy >= 0.18.1',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'six >= 1.12.0',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'sk-video',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'sox >= 1.3.7',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'tensor2tensor',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'tensorflow',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'tensorflow-datasets',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'tensorflow-probability',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'tf_slim',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'wheel',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'dopamine-rl <= 3.0.1',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'imageio',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'librosa >= 0.6.2, < 0.8.0',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'matplotlib >= 1.5.3',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'mido == 1.2.6',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'mir_eval >= 0.4',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'note-seq',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'numba < 0.50', # temporary fix for librosa import
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'numpy',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'Pillow >= 3.4.2',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'pretty_midi >= 0.2.6',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'pygtrie >= 2.3',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'python-rtmidi >= 1.1, < 1.2', # 1.2 breaks us
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'scikit-image',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'scipy >= 0.18.1',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'six >= 1.12.0',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'sk-video',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'sox >= 1.3.7',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'tensor2tensor',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'tensorflow',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'tensorflow-datasets',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'tensorflow-probability',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'tf_slim',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 'wheel',
</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;'>+ EXTRAS_REQUIRE = {
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-magenta/files/setup.cfg.patch b/python/py-magenta/files/setup.cfg.patch
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 3ad0d8f9c5e..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-magenta/files/setup.cfg.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,8 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- ./setup.cfg 2020-07-24 08:46:14.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ ./setup.cfg 2020-07-24 08:46:47.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -2,4 +2,4 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test=pytest
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- [tool:pytest]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--addopts=--disable-warnings --pylint
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+addopts=--disable-warnings
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-magenta/files/setup.py.patch b/python/py-magenta/files/setup.py.patch
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index f6b7430b352..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-magenta/files/setup.py.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,13 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- ./setup.py 2020-07-24 08:14:22.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ ./setup.py 2020-07-24 08:24:54.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -148,10 +148,4 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- package_data={
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 'magenta': ['models/image_stylization/evaluation_images/*.jpg'],
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- },
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- setup_requires=['pytest-runner', 'pytest-pylint'],
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- tests_require=[
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- 'pytest >= 5.2.0',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- 'pytest-xdist < 1.30.0', # 1.30 has problems working with pylint plugin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- 'pylint >= 2.4.2',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- ],
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- )
</span></pre><pre style='margin:0'>
</pre>