<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’m preparing a PR for the Google Magenta project <<a href="https://magenta.tensorflow.org" class="">https://magenta.tensorflow.org</a>>, and am running into this issue for the “note-seq” dependent package with this setup.py:<div class=""><br class=""></div><div class=""><a href="https://github.com/magenta/note-seq/blob/master/setup.py" class="">https://github.com/magenta/note-seq/blob/master/setup.py</a></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">raise DistutilsError('the `allow-hosts` option is not supported '<br class="">distutils.errors.DistutilsError: the `allow-hosts` option is not supported when using pip to install requirements.</blockquote><br class=""></div><div class="">I (believe I) have all the correct dependencies installed, and see that this is an issue with setuptools elsewhere, .e.g., <a href="https://github.com/pypa/setuptools/issues/1916#issuecomment-562788843" class="">https://github.com/pypa/setuptools/issues/1916#issuecomment-562788843</a></div><div class=""><br class=""></div><div class="">Is there a straightforward workaround to this issue?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Full log error:</div><div class=""><blockquote type="cite" class=""><div class="">…</div><div class="">:info:build Executing: cd "/opt/local/var/macports/build/_opt_local_ports_python_py-note-seq/py37-note-seq/work/note-seq-0.0.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 setup.py --no-user-cfg build -j12 <br class="">:debug:build system: cd "/opt/local/var/macports/build/_opt_local_ports_python_py-note-seq/py37-note-seq/work/note-seq-0.0.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 setup.py --no-user-cfg build -j12 <br class="">:info:build Traceback (most recent call last):<br class="">:info:build File "setup.py", line 67, in <module><br class="">:info:build 'pylint >= 2.4.2',<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 160, in setup<br class="">:info:build _install_setup_requires(attrs)<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 155, in _install_setup_requires<br class="">:info:build dist.fetch_build_eggs(dist.setup_requires)<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs<br class="">:info:build replace_conflicting=True,<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve<br class="">:info:build replace_conflicting=replace_conflicting<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match<br class="">:info:build return self.obtain(req, installer)<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain<br class="">:info:build return installer(requirement)<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/dist.py", line 754, in fetch_build_egg<br class="">:info:build return fetch_build_egg(self, req)<br class="">:info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/installer.py", line 83, in fetch_build_egg<br class="">:info:build raise DistutilsError('the `allow-hosts` option is not supported '<br class="">:info:build distutils.errors.DistutilsError: the `allow-hosts` option is not supported when using pip to install requirements.<br class="">:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_ports_python_py-note-seq/py37-note-seq/work/note-seq-0.0.0" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 setup.py --no-user-cfg build -j12 <br class="">:info:build Exit code: 1<br class="">:error:build Failed to build py37-note-seq: command execution failed<br class="">:debug:build Error code: CHILDSTATUS 10565 1<br class="">:debug:build Backtrace: command execution failed<br class="">:debug:build while executing<br class="">:debug:build "system {*}$notty {*}$nice $fullcmdstring"<br class="">:debug:build invoked from within<br class="">:debug:build "command_exec build"<br class="">:debug:build (procedure "portbuild::build_main" line 8)<br class="">:debug:build invoked from within<br class="">:debug:build "$procedure $targetname"<br class="">:error:build See /opt/local/var/macports/logs/_opt_local_ports_python_py-note-seq/py37-note-seq/main.log for details.</div></blockquote></div><div class=""><br class=""></div><div class="">Draft Portfile:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""># -*- 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</div><div class=""><br class=""></div><div class="">PortSystem 1.0</div><div class="">PortGroup github 1.0</div><div class="">PortGroup python 1.0</div><div class=""><br class=""></div><div class="">github.setup magenta note-seq a18f4ba</div><div class="">revision 20200622</div><div class="">name py-${github.project}</div><div class="">categories-append audio</div><div class=""><br class=""></div><div class="">version 0.0.0</div><div class="">platforms darwin</div><div class="">license Apache-2</div><div class="">maintainers nomaintainer</div><div class=""><br class=""></div><div class="">description Use machine learning to create art and music.</div><div class="">long_description ${description}. This is\</div><div class=""> the home for our serializable NoteSequence\</div><div class=""> representation along with utilities for: creating\</div><div class=""> them from various formats (e.g., MIDI, abc,\</div><div class=""> MusicXML)\; manipulating them (e.g., slicing,\</div><div class=""> quantizing) extracting components (e.g., melodies,\</div><div class=""> drum tracks, chord)\; exporting them (e.g., to MIDI\</div><div class=""> or audio)\; or converting them to representations\</div><div class=""> useful for model training (e.g., one-hot tensors).</div><div class=""><br class=""></div><div class="">homepage <a href="https://magenta.tensorflow.org/" class="">https://magenta.tensorflow.org/</a></div><div class="">distname ${github.project}-${version}</div><div class=""><br class=""></div><div class="">checksums rmd160 96aa00282fa38a8ce63d563c2c667d6f241e1850 \</div><div class=""> sha256 5a96d9d4a179cc6f03975d61f379689afc282df524af0613107591dd2aed9223 \</div><div class=""> size 952994</div><div class=""><br class=""></div><div class="">python.versions 37 38</div><div class=""><br class=""></div><div class="">if {${name} ne ${subport}} {</div><div class=""> depends_build-append \</div><div class=""> port:py${python.version}-setuptools</div><div class=""><br class=""></div><div class=""> depends_run-append \</div><div class=""> port:py${python.version}-absl \</div><div class=""> port:py${python.version}-attrs \</div><div class=""> port:py${python.version}-bokeh \</div><div class=""> port:py${python.version}-intervaltree \</div><div class=""> port:py${python.version}-ipython \</div><div class=""> port:py${python.version}-librosa \</div><div class=""> port:py${python.version}-numba \</div><div class=""> port:py${python.version}-numpy \</div><div class=""> port:py${python.version}-pandas \</div><div class=""> port:py${python.version}-pretty-midi \</div><div class=""> port:py${python.version}-protobuf3 \</div><div class=""> port:py${python.version}-scikit-image \</div><div class=""> port:py${python.version}-scipy</div><div class=""><br class=""></div><div class=""> depends_test-append \</div><div class=""> port:py${python.version}-pylint \</div><div class=""> port:py${python.version}-pytest \</div><div class=""> port:py${python.version}-pytest-xdist</div><div class=""><br class=""></div><div class=""> test.run yes</div><div class=""> test.cmd py.test-${python.branch}</div><div class=""> test.target</div><div class=""> test.env-append \</div><div class=""> "PATH=$env(PATH):${workpath}/bin" \</div><div class=""> PYTHONPATH=${worksrcpath}/build/lib</div><div class=""><br class=""></div><div class=""> post-destroot {</div><div class=""> set docdir ${prefix}/share/doc/${subport}</div><div class=""> xinstall -d ${destroot}${docdir}</div><div class=""> xinstall -m 0644 -W ${worksrcpath} LICENSE README.md \</div><div class=""> ${destroot}${docdir}</div><div class=""> }</div><div class=""><br class=""></div><div class=""> livecheck.type none</div><div class="">}</div></blockquote><div class=""><div class=""><br class=""></div></div><br class=""><div class=""><br class=""></div><div class=""><br class=""></div></div></body></html>