Repository: spack/spack

Issue:
Installation issue: py-nbconvert
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:

1. Title the issue "Installation issue: <name-of-the-package>".
2. Provide the information required below.

We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->

Hello,

I builded py-nbconvert, but I didn't get a expected results.
There are copies in build of py-nbconvert.  One  of the copy commands In the spack-build-out.txt of it is below:

`copying share/jupyter/nbconvert/templates/asciidoc/conf.json ->
  $HOME/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/
  py-nbconvert-6.0.1-vn5kgn2s34ise64hcognusscc3erh4cm/""/share/jupyter/nbconvert/templates/asciidoc`

There is a "" in the copy destination specification, which is bad.
This is because the path specified below in the recipe of it and the above copy destination will be different.

`env.prepend_path("JUPYTER_PATH", self.prefix.share.jupyter)`

The build of py-nbconvert itself succeeds, but the build of oss that using py-nbconver and referencing the above path fails.
However, no problem occurred in the following environment.

$ spack debug report
* **Spack:** 0.16.1-1533-62f8087716
* **Python:** 3.6.8
* **Platform:** linux-rhel8-cascadelake
* **Concretizer:** original

Best regards,

Masahiro Kuramoto


### 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-nbconvert
...
```

### Information on your system

$ spack debug report
* **Spack:** 0.16.1-1580-f1d0a819e9
* **Python:** 3.6.8
* **Platform:** linux-rhel8-cascadelake
* **Concretizer:** original

<!-- 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. -->

Nothing special.

<!-- 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. -->
- [x] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [ ] 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:
I'm able to successfully install `py-nbconvert` on my system without any problems. I've been using Spack-installed Jupyter Notebook for a while, so I don't think the installation is buggy for me. Does the installation crash for you? The most recent change to the package was @t-karatsu's #21827, but it works for me. @iarspider and @healther have contributed to the package in the past, although there is no official maintainer.
I know there are no changes to the recipe of py-nbconvert between the above versions.
And although the installation of py-nbconvert itself succeeds, the location where it is installed is strange in the version that reported the error.

- correct:
 spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/ py-nbconvert-6.0.1-xxx/share/jupyter/nbconvert/templates/asciidoc

- wrong:
 spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/ py-nbconvert-6.0.1-xxx/""/share/jupyter/nbconvert/templates/asciidoc

I couldn't figure out where to report the problem, so I reported it as an py-nbconvert error that I found the installation location was strange.

I'm sorry.
I've found the same issue on the other systems below and I'll report it.

$ spack debug report
* **Spack:** 0.16.1-1643-26e73e848d
* **Python:** 3.6.8
* **Platform:** linux-rhel8-a64fx
* **Concretizer:** original

I attached the build logs of oss that is causing the same phenomenon.
Please search for  "running install_data" in the logs.

[py-ipython-7.18.1-spack-build-out.txt](https://github.com/spack/spack/files/6113265/py-ipython-7.18.1-spack-build-out.txt)
[py-nbconvert-6.0.1-spack-build-out.txt](https://github.com/spack/spack/files/6113266/py-nbconvert-6.0.1-spack-build-out.txt)
[py-widgetsnbextension-3.5.1-spack-build-out.txt](https://github.com/spack/spack/files/6113267/py-widgetsnbextension-3.5.1-spack-build-out.txt)
[meson-0.57.1-spack-build-out.txt](https://github.com/spack/spack/files/6113268/meson-0.57.1-spack-build-out.txt)
[py-ipykernel-5.3.4-spack-build-out.txt](https://github.com/spack/spack/files/6113269/py-ipykernel-5.3.4-spack-build-out.txt)


Resolving patch:
diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py
--- a/lib/spack/spack/build_systems/python.py
+++ b/lib/spack/spack/build_systems/python.py
@@ -262,7 +262,7 @@ def install_args(self, spec, prefix):
                  '--install-purelib=%s' % pure_site_packages_dir,
                  '--install-platlib=%s' % plat_site_packages_dir,
                  '--install-scripts=bin',
-                 '--install-data=""',
+                 '--install-data=',
                  '--install-headers=%s' % inc_dir
                  ]
 


Test patch: