We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installation issue: py-lxml doesn't use the spack libxslt and libexslt libraries
It looks like py-lxml should have AUTO_RPATH set to true. Otherwise it picks up the OS versions of libxslt instead of the spack built versions. I added this to the package.py and the library dependencies were correct:

```
    def setup_build_environment(self, env):
        env.set('AUTO_RPATH', 'true')
```

--- 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-lxml/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 PyLxml(PythonPackage):
10     """lxml is the most feature-rich and easy-to-use library for processing
11     XML and HTML in the Python language."""
12 
13     homepage = "http://lxml.de/"
14     url      = "https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz"
15 
16     version('4.4.1', sha256='c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692')
17     version('4.3.3', sha256='4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90')
18     version('4.2.5', sha256='36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f')
19     version('3.7.3', sha256='aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7')
20     version('2.3', sha256='eea1b8d29532739c1383cb4794c5eacd6176f0972b59e8d29348335b87ff2e66')
21 
22     variant('html5', default=False, description='Enable html5lib backend')
23     variant('htmlsoup',  default=False, description='Enable BeautifulSoup4 backend')
24     variant('cssselect',   default=False, description='Enable cssselect module')
25 
26     depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))
27     depends_on('py-setuptools', type='build')
28     depends_on('libxml2', type=('build', 'run'))
29     depends_on('libxslt', type=('build', 'run'))
30     depends_on('py-html5lib', when='+html5', type=('build', 'run'))
31     depends_on('py-beautifulsoup4', when='+htmlsoup', type=('build', 'run'))
32     depends_on('py-cssselect@0.7:', when='+cssselect', type=('build', 'run'))
33
```
--- 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()

```

diff --git a/var/spack/repos/builtin/packages/py-lxml/package.py b/var/spack/repos/builtin/packages/py-lxml/package.py
--- a/var/spack/repos/builtin/packages/py-lxml/package.py
+++ b/var/spack/repos/builtin/packages/py-lxml/package.py
@@ -13,6 +13,7 @@
     homepage = "http://lxml.de/"
     url      = "https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz"
 
+    version('4.5.2', sha256='cdc13a1682b2a6241080745b1953719e7fe0850b40a5c71ca574f090a1391df6')
     version('4.4.1', sha256='c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692')
     version('4.3.3', sha256='4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90')
     version('4.2.5', sha256='36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f')
@@ -25,8 +26,8 @@
 
     depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))
     depends_on('py-setuptools', type='build')
-    depends_on('libxml2', type=('build', 'run'))
-    depends_on('libxslt', type=('build', 'run'))
+    depends_on('libxml2', type=('build', 'link', 'run'))
+    depends_on('libxslt', type=('build', 'link', 'run'))
     depends_on('py-html5lib', when='+html5', type=('build', 'run'))
     depends_on('py-beautifulsoup4', when='+htmlsoup', type=('build', 'run'))
     depends_on('py-cssselect@0.7:', when='+cssselect', type=('build', 'run'))

{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/py-lxml/package.py b/var/spack/repos/builtin/packages/py-lxml/package.py\n--- a/var/spack/repos/builtin/packages/py-lxml/package.py\n+++ b/var/spack/repos/builtin/packages/py-lxml/package.py\n@@ -13,6 +13,7 @@\n     homepage = \"http://lxml.de/\"\n     url      = \"https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz\"\n \n+    version('4.5.2', sha256='cdc13a1682b2a6241080745b1953719e7fe0850b40a5c71ca574f090a1391df6')\n     version('4.4.1', sha256='c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692')\n     version('4.3.3', sha256='4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90')\n     version('4.2.5', sha256='36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f')\n@@ -25,8 +26,8 @@\n \n     depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))\n     depends_on('py-setuptools', type='build')\n-    depends_on('libxml2', type=('build', 'run'))\n-    depends_on('libxslt', type=('build', 'run'))\n+    depends_on('libxml2', type=('build', 'link', 'run'))\n+    depends_on('libxslt', type=('build', 'link', 'run'))\n     depends_on('py-html5lib', when='+html5', type=('build', 'run'))\n     depends_on('py-beautifulsoup4', when='+htmlsoup', type=('build', 'run'))\n     depends_on('py-cssselect@0.7:', when='+cssselect', type=('build', 'run'))\n", "issue": "Installation issue: py-lxml doesn't use the spack libxslt and libexslt libraries\nIt looks like py-lxml should have AUTO_RPATH set to true. Otherwise it picks up the OS versions of libxslt instead of the spack built versions. I added this to the package.py and the library dependencies were correct:\r\n\r\n```\r\n    def setup_build_environment(self, env):\r\n        env.set('AUTO_RPATH', 'true')\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 PyLxml(PythonPackage):\n    \"\"\"lxml is the most feature-rich and easy-to-use library for processing\n    XML and HTML in the Python language.\"\"\"\n\n    homepage = \"http://lxml.de/\"\n    url      = \"https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz\"\n\n    version('4.4.1', sha256='c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692')\n    version('4.3.3', sha256='4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90')\n    version('4.2.5', sha256='36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f')\n    version('3.7.3', sha256='aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7')\n    version('2.3', sha256='eea1b8d29532739c1383cb4794c5eacd6176f0972b59e8d29348335b87ff2e66')\n\n    variant('html5', default=False, description='Enable html5lib backend')\n    variant('htmlsoup',  default=False, description='Enable BeautifulSoup4 backend')\n    variant('cssselect',   default=False, description='Enable cssselect module')\n\n    depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))\n    depends_on('py-setuptools', type='build')\n    depends_on('libxml2', type=('build', 'run'))\n    depends_on('libxslt', type=('build', 'run'))\n    depends_on('py-html5lib', when='+html5', type=('build', 'run'))\n    depends_on('py-beautifulsoup4', when='+htmlsoup', type=('build', 'run'))\n    depends_on('py-cssselect@0.7:', when='+cssselect', type=('build', 'run'))\n", "path": "var/spack/repos/builtin/packages/py-lxml/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 PyLxml(PythonPackage):\n    \"\"\"lxml is the most feature-rich and easy-to-use library for processing\n    XML and HTML in the Python language.\"\"\"\n\n    homepage = \"http://lxml.de/\"\n    url      = \"https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz\"\n\n    version('4.5.2', sha256='cdc13a1682b2a6241080745b1953719e7fe0850b40a5c71ca574f090a1391df6')\n    version('4.4.1', sha256='c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692')\n    version('4.3.3', sha256='4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90')\n    version('4.2.5', sha256='36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f')\n    version('3.7.3', sha256='aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7')\n    version('2.3', sha256='eea1b8d29532739c1383cb4794c5eacd6176f0972b59e8d29348335b87ff2e66')\n\n    variant('html5', default=False, description='Enable html5lib backend')\n    variant('htmlsoup',  default=False, description='Enable BeautifulSoup4 backend')\n    variant('cssselect',   default=False, description='Enable cssselect module')\n\n    depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))\n    depends_on('py-setuptools', type='build')\n    depends_on('libxml2', type=('build', 'link', 'run'))\n    depends_on('libxslt', type=('build', 'link', 'run'))\n    depends_on('py-html5lib', when='+html5', type=('build', 'run'))\n    depends_on('py-beautifulsoup4', when='+htmlsoup', type=('build', 'run'))\n    depends_on('py-cssselect@0.7:', when='+cssselect', type=('build', 'run'))\n", "path": "var/spack/repos/builtin/packages/py-lxml/package.py"}]}