Repository: spack/spack

Issue:
Installation issue: py-numpy
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:


### Steps to reproduce the issue

<!-- Fill in the exact spec you are trying to build and the relevant part of the error message -->
```console
$ spack install py-numpy

4.3.1/py-cython-0.29.21-ewd7xu2xdndjpby76rntlqelig2bx23k
==> Installing py-numpy-1.20.0-rv5miloycltswjxmrybjhknknb5yzwvy
==> No binary for py-numpy-1.20.0-rv5miloycltswjxmrybjhknknb5yzwvy found: installing from source
==> Using cached archive: /vol0004/hp200139/data/u00444/projects/spack/var/spack/cache/_source-cache/archive/3d/3d8233c03f116d068d5365fed4477f2947c7229582dad81e5953088989294cec.zip
1 out of 1 hunk FAILED -- saving rejects to file numpy/distutils/fcompiler/__init__.py.rej
==> Patch /vol0004/hp200139/data/u00444/projects/spack/var/spack/repos/builtin/packages/py-numpy/add_fj_compiler.patch failed.
==> Error: ProcessError: Command exited with status 1:
    '/usr/bin/patch' '-s' '-p' '1' '-i' '/vol0004/hp200139/data/u00444/projects/spack/var/spack/repos/builtin/packages/py-numpy/add_fj_compiler.patch' '-d' '.'...
```

### Information on your system

<!-- Please include the output of `spack debug report` -->

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

### Additional information

<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->
* [spack-build-out.txt]()
* [spack-build-env.txt]()

<!-- Some packages have maintainers who have volunteered to debug build failures. Run `spack maintainers <name-of-the-package>` and @mention them here if they exist. -->

### General information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [ ] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x] I have run `spack maintainers <name-of-the-package>` and @mentioned any maintainers
- [ ] I have uploaded the build log and environment files
- [ ] I have searched the issues of this repo and believe this is not a duplicate



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -100,7 +100,7 @@ class PyNumpy(PythonPackage):
     patch('blas-lapack-order.patch', when='@1.15:1.16')
 
     # Add Fujitsu Fortran compiler
-    patch('add_fj_compiler.patch', when='@1.19.3:%fj')
+    patch('add_fj_compiler.patch', when='@1.19.3:1.19.5%fj')
     patch('add_fj_compiler2.patch', when='@1.19.0:1.19.2%fj')
     patch('add_fj_compiler3.patch', when='@1.14.0:1.18.5%fj')
     patch('add_fj_compiler4.patch', when='@:1.13.3%fj')
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -85,7 +85,7 @@ def setup_build_environment(self, env):
     def build_args(self, spec, prefix):
         args = []
         if spec.satisfies('%fj'):
-            args.extend(['config_fc', '--fcompiler=fj'])
+            args.extend(['config_fc', '--fcompiler=fujitsu'])
 
         # Build in parallel
         # Known problems with Python 3.5+


Test patch: