<p dir="auto">Running</p>
<p dir="auto"><code class="notranslate">f2py -c --help-compiler</code></p>
<p dir="auto">hangs indefinitely on Ubuntu 18.04 as a result of <code class="notranslate">shlex.split()</code> being called on <code class="notranslate">None</code>.</p>
<p dir="auto">This occurs at line 471 in <code class="notranslate">fcompiler/__init__.py</code> when <code class="notranslate">show_fcompilers()</code> calls <code class="notranslate">customize()</code> and <code class="notranslate">self.command_vars.compiler_f77 = f77</code>, <code class="notranslate">self.command_vars.compiler_f90 = None</code></p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import shlex
import os

shlex.split(None,posix=(os.name=='posix'))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">shlex</span>
<span class="pl-k">import</span> <span class="pl-s1">os</span>

<span class="pl-s1">shlex</span>.<span class="pl-en">split</span>(<span class="pl-c1">None</span>,<span class="pl-s1">posix</span><span class="pl-c1">=</span>(<span class="pl-s1">os</span>.<span class="pl-s1">name</span><span class="pl-c1">==</span><span class="pl-s">'posix'</span>))</pre></div>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto"><strong>Python Version</strong>: Python 3.6.7<br>
<strong>Numpy version</strong>: 1.16.0 3.6.7 (default, Oct 22 2018, 11:32:17)<br>
[GCC 8.2.0]</p>
<p dir="auto">Installation of NumPy 1.16.0 will hung up for me with python 2.7.15 for me,<br>
in fcompiler detection.</p>
<p dir="auto">Hung up here:<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/numpy/numpy/blob/971e2e89d08deeae0139d3011d15646fdac13c92/numpy/distutils/fcompiler/__init__.py#L471-L472">numpy/numpy/distutils/fcompiler/__init__.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 471 to 472
      in
      <a data-pjax="true" class="commit-tease-sha" href="/numpy/numpy/commit/971e2e89d08deeae0139d3011d15646fdac13c92">971e2e8</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L471" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="471"></td>
          <td id="LC471" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">f90</span> <span class="pl-c1">=</span> <span class="pl-s1">shlex</span>.<span class="pl-en">split</span>(<span class="pl-s1">self</span>.<span class="pl-s1">command_vars</span>.<span class="pl-s1">compiler_f90</span>, </td>
        </tr>

        <tr class="border-0">
          <td id="L472" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="472"></td>
          <td id="LC472" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                   <span class="pl-s1">posix</span><span class="pl-c1">=</span>(<span class="pl-s1">os</span>.<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s">'posix'</span>)) </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">For my environment, <code class="notranslate">self.command_vars.compiler_f90</code> is <code class="notranslate">None</code> here, so it (<code class="notranslate">shlex.split</code>) is waiting standard input.</p>