Skip to content

Commit

Permalink
Fix lru caching for Python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
da-wad committed Mar 20, 2020
1 parent 0f29343 commit 4d0cbeb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion seismic_zfp/loader.py
@@ -1,4 +1,7 @@
from functools import lru_cache
try:
from functools import lru_cache
except ImportError:
from functools32 import lru_cache
import numpy as np
from pyzfp import decompress

Expand Down
5 changes: 4 additions & 1 deletion seismic_zfp/read.py
@@ -1,5 +1,8 @@
import os
from functools import lru_cache
try:
from functools import lru_cache
except ImportError:
from functools32 import lru_cache
import numpy as np
import segyio
from segyio import _segyio
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -17,7 +17,8 @@ def read(filename):
license='LGPL-3.0',

use_scm_version=True,
install_requires=['segyio', 'pyzfp', 'psutil', 'pillow', 'matplotlib', 'Cython'],
install_requires=['functools32;python_version<"3"',
'segyio', 'pyzfp', 'psutil', 'pillow', 'matplotlib', 'Cython'],
setup_requires=['setuptools', 'setuptools_scm'],

packages=['seismic_zfp']
Expand Down

0 comments on commit 4d0cbeb

Please sign in to comment.