<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Compile SciPy on Docker image i386/python:3.10.11-slim-bullseye not Success.</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="Test1
RUN pip3 install scipy==1.10.1  &lt;-- Not work
Test2 
RUN pip3 install --no-cache-dir git+https://github.com/andyfaff/scipy &lt;-- Not work"><pre class="notranslate"><span class="pl-v">Test1</span>
<span class="pl-v">RUN</span> <span class="pl-s1">pip3</span> <span class="pl-s1">install</span> <span class="pl-s1">scipy</span><span class="pl-c1">==</span><span class="pl-c1">1.10</span>.<span class="pl-c1">1</span>  <span class="pl-c1">&lt;</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">Not</span> <span class="pl-s1">work</span>
<span class="pl-v">Test2</span> 
<span class="pl-v">RUN</span> <span class="pl-s1">pip3</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">no</span><span class="pl-c1">-</span><span class="pl-s1">cache</span><span class="pl-c1">-</span><span class="pl-s1">dir</span> <span class="pl-s1">git</span><span class="pl-c1">+</span><span class="pl-s1">https</span>:<span class="pl-c1">//</span><span class="pl-s1">github</span>.<span class="pl-s1">com</span><span class="pl-c1">/</span><span class="pl-s1">andyfaff</span><span class="pl-c1">/</span><span class="pl-s1">scipy</span> <span class="pl-c1">&lt;</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">Not</span> <span class="pl-s1">work</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Collecting git+https://github.com/andyfaff/scipy
  Cloning https://github.com/andyfaff/scipy to /tmp/pip-req-build-8vsmg7hl
  Running command git clone --filter=blob:none --quiet https://github.com/andyfaff/scipy /tmp/pip-req-build-8vsmg7hl
  Resolved https://github.com/andyfaff/scipy to commit 52a5ecb875588fcef5bc18dcd84b302a9ba9bd39
  Running command git submodule update --init --recursive -q
  From https://github.com/boostorg/math
   * branch                109a814e89f77ff8a3fc8f0391f6b35a12640669 -&gt; FETCH_HEAD
  From https://github.com/scipy/highs
   * branch              4a122958a82e67e725d08153e099efe4dad099a2 -&gt; FETCH_HEAD
  From https://github.com/scipy/unuran
   * branch            a63d39160e5ecc4402e7ed0e8417f4c3ff9634cb -&gt; FETCH_HEAD
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─&gt; [16 lines of output]
      + meson setup /tmp/pip-req-build-8vsmg7hl /tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build/meson-python-native-file.ini
      The Meson build system
      Version: 1.1.0
      Source dir: /tmp/pip-req-build-8vsmg7hl
      Build dir: /tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build
      Build type: native build
      Project name: SciPy
      Project version: 1.11.0.dev0
      C compiler for the host machine: cc (gcc 10.2.1 &quot;cc (Debian 10.2.1-6) 10.2.1 20210110&quot;)
      C linker for the host machine: cc ld.bfd 2.35.2
      C++ compiler for the host machine: c++ (gcc 10.2.1 &quot;c++ (Debian 10.2.1-6) 10.2.1 20210110&quot;)
      C++ linker for the host machine: c++ ld.bfd 2.35.2

      ../../meson.build:1:0: ERROR: Cython compiler 'cython' cannot compile programs

      A full log can be found at /tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build/meson-logs/meson-log.txt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─&gt; See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details."><pre class="notranslate">Collecting git+https://github.com/andyfaff/scipy
  Cloning https://github.com/andyfaff/scipy to /tmp/pip-req-build-8vsmg7hl
  Running <span class="pl-c1">command</span> git clone --filter=blob:none --quiet https://github.com/andyfaff/scipy /tmp/pip-req-build-8vsmg7hl
  Resolved https://github.com/andyfaff/scipy to commit 52a5ecb875588fcef5bc18dcd84b302a9ba9bd39
  Running <span class="pl-c1">command</span> git submodule update --init --recursive -q
  From https://github.com/boostorg/math
   <span class="pl-k">*</span> branch                109a814e89f77ff8a3fc8f0391f6b35a12640669 -<span class="pl-k">&gt;</span> FETCH_HEAD
  From https://github.com/scipy/highs
   <span class="pl-k">*</span> branch              4a122958a82e67e725d08153e099efe4dad099a2 -<span class="pl-k">&gt;</span> FETCH_HEAD
  From https://github.com/scipy/unuran
   <span class="pl-k">*</span> branch            a63d39160e5ecc4402e7ed0e8417f4c3ff9634cb -<span class="pl-k">&gt;</span> FETCH_HEAD
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status <span class="pl-s"><span class="pl-pds">'</span>done<span class="pl-pds">'</span></span>
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status <span class="pl-s"><span class="pl-pds">'</span>done<span class="pl-pds">'</span></span>
  Installing backend dependencies: started
  Installing backend dependencies: finished with status <span class="pl-s"><span class="pl-pds">'</span>done<span class="pl-pds">'</span></span>
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status <span class="pl-s"><span class="pl-pds">'</span>error<span class="pl-pds">'</span></span>
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ <span class="pl-c1">exit</span> code: 1
  ╰─<span class="pl-k">&gt;</span> [16 lines of output]
      + meson setup /tmp/pip-req-build-8vsmg7hl /tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build/meson-python-native-file.ini
      The Meson build system
      Version: 1.1.0
      Source dir: /tmp/pip-req-build-8vsmg7hl
      Build dir: /tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build
      Build type: native build
      Project name: SciPy
      Project version: 1.11.0.dev0
      C compiler <span class="pl-k">for</span> the host machine: cc (gcc 10.2.1 <span class="pl-s"><span class="pl-pds">"</span>cc (Debian 10.2.1-6) 10.2.1 20210110<span class="pl-pds">"</span></span>)
      C linker <span class="pl-k">for</span> the host machine: cc ld.bfd 2.35.2
      C++ compiler <span class="pl-k">for</span> the host machine: c++ (gcc 10.2.1 <span class="pl-s"><span class="pl-pds">"</span>c++ (Debian 10.2.1-6) 10.2.1 20210110<span class="pl-pds">"</span></span>)
      C++ linker <span class="pl-k">for</span> the host machine: c++ ld.bfd 2.35.2

      ../../meson.build:1:0: ERROR: Cython compiler <span class="pl-s"><span class="pl-pds">'</span>cython<span class="pl-pds">'</span></span> cannot compile programs

      A full log can be found at /tmp/pip-req-build-8vsmg7hl/.mesonpy-c5n8yvav/build/meson-logs/meson-log.txt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error <span class="pl-k">while</span> generating package metadata.
╰─<span class="pl-k">&gt;</span> See above <span class="pl-k">for</span> output.

note: This is an issue with the package mentioned above, not pip.
hint: See above <span class="pl-k">for</span> details.</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version and system information</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SciPy=1.10.1 
Python=3.10
Cython=3.0.0b2"><pre class="notranslate">SciPy=1.10.1 
Python=3.10
Cython=3.0.0b2</pre></div>
<p dir="auto">Want to build from source to work on adding a missing distribution (Landau distribution). Following the steps from <a href="https://scipy.github.io/devdocs/dev/dev_quickstart.html" rel="nofollow">here</a>. Using the <em>pip+venv</em> workflow. Already cloned the repo and created the virtual environment, run <code class="notranslate">python -m pip install numpy pytest cython pythran pybind11 meson ninja pydevtool rich-click</code> successfully. I am getting an error when running <code class="notranslate">python3 dev.py build</code>, specifically <code class="notranslate">meson.build:1:0: ERROR: Cython compiler 'cython' cannot compile programs</code>. If I look into the log I find:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Compiler stderr:
...
  File &quot;/home/me/.venvs/scipy-dev/lib/python3.10/site-packages/pythran/optimizations/pattern_transform.py&quot;, line 346, in &lt;module&gt;
    getattr(PatternTransform, attr_name) + (known_pattern,))
AttributeError: type object 'PatternTransform' has no attribute 'typePatterns'. Did you mean: 'CallPatterns'?"><pre class="notranslate"><code class="notranslate">Compiler stderr:
...
  File "/home/me/.venvs/scipy-dev/lib/python3.10/site-packages/pythran/optimizations/pattern_transform.py", line 346, in &lt;module&gt;
    getattr(PatternTransform, attr_name) + (known_pattern,))
AttributeError: type object 'PatternTransform' has no attribute 'typePatterns'. Did you mean: 'CallPatterns'?
</code></pre></div>
<p dir="auto">How can I fix this to build the development version of scipy?</p>
<p dir="auto">OS: Ubuntu 22.04.<br>
Python: 3.10.6</p>