diff options
author | Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> | 2021-10-12 02:44:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 00:44:32 +0000 |
commit | 0da892f2dd359d168d011ec0ab9430bc31eedd54 (patch) | |
tree | a7c3242b6dea2c05f78ae7c1e3a758400401047b | |
parent | a36a5ab6242c0fa9676ae36c0d0987e263a47133 (diff) | |
download | spack-0da892f2dd359d168d011ec0ab9430bc31eedd54.tar.gz spack-0da892f2dd359d168d011ec0ab9430bc31eedd54.tar.bz2 spack-0da892f2dd359d168d011ec0ab9430bc31eedd54.tar.xz spack-0da892f2dd359d168d011ec0ab9430bc31eedd54.zip |
py-pandas: fix installation and tests for versions @:0.25 (#26668)
-rw-r--r-- | var/spack/repos/builtin/packages/py-pandas/package.py | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index e5aad49409..835000165c 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -13,21 +13,6 @@ class PyPandas(PythonPackage): pypi = "pandas/pandas-1.2.0.tar.gz" maintainers = ['adamjstewart'] - import_modules = [ - 'pandas', 'pandas.compat', 'pandas.compat.numpy', 'pandas.core', - 'pandas.core.reshape', 'pandas.core.tools', 'pandas.core.util', - 'pandas.core.array_algos', 'pandas.core.dtypes', 'pandas.core.groupby', - 'pandas.core.internals', 'pandas.core.computation', - 'pandas.core.window', 'pandas.core.arrays', - 'pandas.core.arrays.sparse', 'pandas.core.ops', 'pandas.core.sparse', - 'pandas.core.indexes', 'pandas.util', 'pandas.io', 'pandas.io.formats', - 'pandas.io.excel', 'pandas.io.json', 'pandas.io.sas', - 'pandas.io.clipboard', 'pandas.tseries', 'pandas._libs', - 'pandas._libs.window', 'pandas._libs.tslibs', 'pandas.plotting', - 'pandas.arrays', 'pandas.api', 'pandas.api.indexers', - 'pandas.api.types', 'pandas.api.extensions', 'pandas.errors', - 'pandas._config' - ] version('1.3.3', sha256='272c8cb14aa9793eada6b1ebe81994616e647b5892a370c7135efb2924b701df') version('1.3.2', sha256='cbcb84d63867af3411fa063af3de64902665bb5b3d40b25b2059e40603594e87') @@ -78,6 +63,8 @@ class PyPandas(PythonPackage): depends_on('py-setuptools@24.2.0:', type='build') depends_on('py-setuptools@38.6.0:', type='build', when='@1.3:') depends_on('py-numpy', type=('build', 'run')) + # 'NUMPY_IMPORT_ARRAY_RETVAL' was removed in numpy@0.19 + depends_on('py-numpy@:1.18', type=('build', 'run'), when='@:0.25') depends_on('py-numpy@1.13.3:', type=('build', 'run'), when='@0.25:') depends_on('py-numpy@1.15.4:', type=('build', 'run'), when='@1.1:') depends_on('py-numpy@1.16.5:', type=('build', 'run'), when='@1.2:') @@ -99,3 +86,12 @@ class PyPandas(PythonPackage): # Optional dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies + + @property + def import_modules(self): + modules = super().import_modules + + ignored_imports = ["pandas.tests", "pandas.plotting._matplotlib"] + + return [i for i in modules + if not any(map(i.startswith, ignored_imports))] |