prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  py-pyfftw import issue with scipy.fftpack
  Hi,
  Sorry to bother you all.
  After loading the spack modules via:
  ```console
    spack load -r python@3.7.6
    spack load py-h5py
    spack load py-scipy
    spack load py-pyfftw
    spack load py-mpi4py
  ```
  When in the python code I am using I try to do `import spicy_fftpack`, I have been getting an error message that ends with:
  
  ### Error Message
  ```python
  from scipy.fftpack import (dct, idct, dst, idst, diff, tilbert, itilbert,
  ImportError: cannot import name '_fftpack' from 'scipy.fftpack'
  ```
  The full error output is in [error.txt](https://github.com/spack/spack/files/4252499/error.txt).
  
  I think that that error is solved in the recent version of pfftw (https://github.com/pyFFTW/pyFFTW/pull/265 and https://github.com/pyFFTW/pyFFTW/issues/279).
  
  But in my machine I still get that error.
  I am not sure if I am installing py-pyfftw or py-scipy incorrectly, or making another mistake.
  Or if I would just need to add an equivalent line to:
  ```vim
  version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')
  ```
  but for version `0.12.0`, to the package.py of py-pyfftw of spack.
  
  Do you have any suggestion on how I can fix this issue and correctly import the library?
  
  Thank you,
  Diana
  
  ### System
  
   1. macOS Catalina - %clang@11.0.0-apple (but with gcc@9.2.0 fortran compilers - see compilers.yaml below)
   2. spack installed python (@3.7.6)
   3. spack installed py-scipy (@1.4.1)
   4. spack installed py-pfftw (@0.11.1)
  
  -----
  
  **compilers.yaml**
  ```vim
  compilers:
  - compiler:
      spec: clang@11.0.0-apple
      paths:
        cc: /usr/bin/clang
        cxx: /usr/bin/clang++
        f77: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
        fc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
      flags: {}
      operating_system: catalina
      target: x86_64
      modules: []
      environment: {}
      extra_rpaths: []
  - compiler:
      spec: gcc@9.2.0
      paths:
        cc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gcc
        cxx: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/g++
        f77: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
        fc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran
      flags: {}
      operating_system: catalina
      target: x86_64
      modules: []
      environment: {}
      extra_rpaths: []
  ```
  -----
  
  **packages.yaml**
  ```vim
  packages:
    all:
      providers:
        mpi: [mpich, openmpi]
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `var/spack/repos/builtin/packages/py-pyfftw/package.py`
  Content:
  ```
  1 # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
  2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
  3 #
  4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
  5 
  6 from spack import *
  7 
  8 
  9 class PyPyfftw(PythonPackage):
  10     """A pythonic wrapper around FFTW, the FFT library,
  11     presenting a unified interface for all the supported transforms."""
  12 
  13     homepage = "http://hgomersall.github.com/pyFFTW"
  14     url      = "https://pypi.io/packages/source/p/pyFFTW/pyFFTW-0.10.4.tar.gz"
  15 
  16     version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')
  17     version('0.10.4', sha256='739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a')
  18 
  19     depends_on('fftw')
  20     depends_on('py-setuptools',    type='build')
  21     depends_on('py-cython',        type='build')
  22     depends_on('py-numpy@1.6:',    type=('build', 'run'))
  23     depends_on('py-scipy@0.12.0:', type=('build', 'run'))
  24
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/var/spack/repos/builtin/packages/py-pyfftw/package.py b/var/spack/repos/builtin/packages/py-pyfftw/package.py
  --- a/var/spack/repos/builtin/packages/py-pyfftw/package.py
  +++ b/var/spack/repos/builtin/packages/py-pyfftw/package.py
  @@ -13,11 +13,12 @@
       homepage = "http://hgomersall.github.com/pyFFTW"
       url      = "https://pypi.io/packages/source/p/pyFFTW/pyFFTW-0.10.4.tar.gz"
   
  +    version('0.12.0', sha256='60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0')
       version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')
       version('0.10.4', sha256='739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a')
   
       depends_on('fftw')
  -    depends_on('py-setuptools',    type='build')
  -    depends_on('py-cython',        type='build')
  -    depends_on('py-numpy@1.6:',    type=('build', 'run'))
  -    depends_on('py-scipy@0.12.0:', type=('build', 'run'))
  +    depends_on('py-setuptools',        type='build')
  +    depends_on('py-cython@0.29:0.999', type='build')
  +    depends_on('py-numpy@1.6:',        type=('build', 'run'), when='@:0.10.4')
  +    depends_on('py-numpy@1.10:1.999',  type=('build', 'run'), when='@0.11.0:')
  
verification_info: {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/py-pyfftw/package.py b/var/spack/repos/builtin/packages/py-pyfftw/package.py\n--- a/var/spack/repos/builtin/packages/py-pyfftw/package.py\n+++ b/var/spack/repos/builtin/packages/py-pyfftw/package.py\n@@ -13,11 +13,12 @@\n     homepage = \"http://hgomersall.github.com/pyFFTW\"\n     url      = \"https://pypi.io/packages/source/p/pyFFTW/pyFFTW-0.10.4.tar.gz\"\n \n+    version('0.12.0', sha256='60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0')\n     version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')\n     version('0.10.4', sha256='739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a')\n \n     depends_on('fftw')\n-    depends_on('py-setuptools',    type='build')\n-    depends_on('py-cython',        type='build')\n-    depends_on('py-numpy@1.6:',    type=('build', 'run'))\n-    depends_on('py-scipy@0.12.0:', type=('build', 'run'))\n+    depends_on('py-setuptools',        type='build')\n+    depends_on('py-cython@0.29:0.999', type='build')\n+    depends_on('py-numpy@1.6:',        type=('build', 'run'), when='@:0.10.4')\n+    depends_on('py-numpy@1.10:1.999',  type=('build', 'run'), when='@0.11.0:')\n", "issue": "py-pyfftw import issue with scipy.fftpack\nHi,\r\nSorry to bother you all.\r\nAfter loading the spack modules via:\r\n```console\r\n  spack load -r python@3.7.6\r\n  spack load py-h5py\r\n  spack load py-scipy\r\n  spack load py-pyfftw\r\n  spack load py-mpi4py\r\n```\r\nWhen in the python code I am using I try to do `import spicy_fftpack`, I have been getting an error message that ends with:\r\n\r\n### Error Message\r\n```python\r\nfrom scipy.fftpack import (dct, idct, dst, idst, diff, tilbert, itilbert,\r\nImportError: cannot import name '_fftpack' from 'scipy.fftpack'\r\n```\r\nThe full error output is in [error.txt](https://github.com/spack/spack/files/4252499/error.txt).\r\n\r\nI think that that error is solved in the recent version of pfftw (https://github.com/pyFFTW/pyFFTW/pull/265 and https://github.com/pyFFTW/pyFFTW/issues/279).\r\n\r\nBut in my machine I still get that error.\r\nI am not sure if I am installing py-pyfftw or py-scipy incorrectly, or making another mistake.\r\nOr if I would just need to add an equivalent line to:\r\n```vim\r\nversion('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')\r\n```\r\nbut for version `0.12.0`, to the package.py of py-pyfftw of spack.\r\n\r\nDo you have any suggestion on how I can fix this issue and correctly import the library?\r\n\r\nThank you,\r\nDiana\r\n\r\n### System\r\n\r\n 1. macOS Catalina - %clang@11.0.0-apple (but with gcc@9.2.0 fortran compilers - see compilers.yaml below)\r\n 2. spack installed python (@3.7.6)\r\n 3. spack installed py-scipy (@1.4.1)\r\n 4. spack installed py-pfftw (@0.11.1)\r\n\r\n-----\r\n\r\n**compilers.yaml**\r\n```vim\r\ncompilers:\r\n- compiler:\r\n    spec: clang@11.0.0-apple\r\n    paths:\r\n      cc: /usr/bin/clang\r\n      cxx: /usr/bin/clang++\r\n      f77: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran\r\n      fc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran\r\n    flags: {}\r\n    operating_system: catalina\r\n    target: x86_64\r\n    modules: []\r\n    environment: {}\r\n    extra_rpaths: []\r\n- compiler:\r\n    spec: gcc@9.2.0\r\n    paths:\r\n      cc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gcc\r\n      cxx: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/g++\r\n      f77: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran\r\n      fc: /Users/LDianaAmorim/Documents/opt/spack/opt/spack/darwin-catalina-x86_64/clang-11.0.0-apple/gcc-9.2.0-exw25ccpcwqlkcvuwn266kvwqzxbyelp/bin/gfortran\r\n    flags: {}\r\n    operating_system: catalina\r\n    target: x86_64\r\n    modules: []\r\n    environment: {}\r\n    extra_rpaths: []\r\n```\r\n-----\r\n\r\n**packages.yaml**\r\n```vim\r\npackages:\r\n  all:\r\n    providers:\r\n      mpi: [mpich, openmpi]\r\n```\n", "before_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass PyPyfftw(PythonPackage):\n    \"\"\"A pythonic wrapper around FFTW, the FFT library,\n    presenting a unified interface for all the supported transforms.\"\"\"\n\n    homepage = \"http://hgomersall.github.com/pyFFTW\"\n    url      = \"https://pypi.io/packages/source/p/pyFFTW/pyFFTW-0.10.4.tar.gz\"\n\n    version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')\n    version('0.10.4', sha256='739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a')\n\n    depends_on('fftw')\n    depends_on('py-setuptools',    type='build')\n    depends_on('py-cython',        type='build')\n    depends_on('py-numpy@1.6:',    type=('build', 'run'))\n    depends_on('py-scipy@0.12.0:', type=('build', 'run'))\n", "path": "var/spack/repos/builtin/packages/py-pyfftw/package.py"}], "after_files": [{"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass PyPyfftw(PythonPackage):\n    \"\"\"A pythonic wrapper around FFTW, the FFT library,\n    presenting a unified interface for all the supported transforms.\"\"\"\n\n    homepage = \"http://hgomersall.github.com/pyFFTW\"\n    url      = \"https://pypi.io/packages/source/p/pyFFTW/pyFFTW-0.10.4.tar.gz\"\n\n    version('0.12.0', sha256='60988e823ca75808a26fd79d88dbae1de3699e72a293f812aa4534f8a0a58cb0')\n    version('0.11.1', sha256='05ea28dede4c3aaaf5c66f56eb0f71849d0d50f5bc0f53ca0ffa69534af14926')\n    version('0.10.4', sha256='739b436b7c0aeddf99a48749380260364d2dc027cf1d5f63dafb5f50068ede1a')\n\n    depends_on('fftw')\n    depends_on('py-setuptools',        type='build')\n    depends_on('py-cython@0.29:0.999', type='build')\n    depends_on('py-numpy@1.6:',        type=('build', 'run'), when='@:0.10.4')\n    depends_on('py-numpy@1.10:1.999',  type=('build', 'run'), when='@0.11.0:')\n", "path": "var/spack/repos/builtin/packages/py-pyfftw/package.py"}]}