From c49c37af9b3664e6807169ede5dfb4ecd03643ab Mon Sep 17 00:00:00 2001
From: Ross Miller <rgmiller@ornl.gov>
Date: Fri, 27 Sep 2019 20:19:36 -0400
Subject: py-adios package: restrict python dependency to <=3.6.x (#12932)

The adios code (currently) won't compile against the Python 3.7 C API.
This change adds a dependency on 3.6 or less.
---
 var/spack/repos/builtin/packages/py-adios/package.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/var/spack/repos/builtin/packages/py-adios/package.py b/var/spack/repos/builtin/packages/py-adios/package.py
index a297f39fc9..2149c0e223 100644
--- a/var/spack/repos/builtin/packages/py-adios/package.py
+++ b/var/spack/repos/builtin/packages/py-adios/package.py
@@ -35,6 +35,14 @@ class PyAdios(PythonPackage):
                    when='@{0} +mpi'.format(v),
                    type=['build', 'link', 'run'])
 
+    # NOTE: this dependency is a work-around for a bug in Adios itself.
+    # Specifically, Adios uses code that was generated by Cython 0.28.2.
+    # This code won't compile against the Python 3.7 C API.
+    # See https://github.com/ornladios/ADIOS/issues/202 and
+    # the first entry under "Bug Fixes" at
+    # https://github.com/cython/cython/blob/0.29.x/CHANGES.rst
+    depends_on('python@:3.6')
+
     depends_on('py-numpy', type=['build', 'run'])
     depends_on('mpi', when='+mpi')
     depends_on('py-mpi4py', type=['run'], when='+mpi')
-- 
cgit v1.2.3-70-g09d2