diff --git a/evtk/__init__.py b/evtk/__init__.py new file mode 100644 index 0000000..7816d09 --- /dev/null +++ b/evtk/__init__.py @@ -0,0 +1,4 @@ +from pyevtk import * + +import warnings +warnings.warn('the "evtk" package is deprecated, use "pyevtk" instead', DeprecationWarning) \ No newline at end of file diff --git a/setup.py b/setup.py index d46a964..039155b 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ def readme(fname): maintainer='Adamos Kyriakou', maintainer_email='somada141@gmail.com', url='https://bitbucket.org/pauloh/pyevtk', - packages=['pyevtk'], + packages=['pyevtk', 'evtk'], package_dir={'pyevtk': 'pyevtk'}, package_data={'pyevtk': ['LICENSE.txt', 'examples/*.py']}, install_requires=[ diff --git a/tests/dummy.py b/tests/dummy.py index dc4db39..f4c730f 100644 --- a/tests/dummy.py +++ b/tests/dummy.py @@ -15,3 +15,14 @@ def test_examples(): examples = [os.path.join(root, f) for f in files if f.endswith('.py')] for ex in examples: runpy.run_path(ex) + + +def test_compat_lib(): + with pytest.warns(DeprecationWarning): + import evtk + import pyevtk + assert pyevtk.evtk is evtk.evtk + assert pyevtk.hl is evtk.hl + assert pyevtk.vtk is evtk.vtk + assert pyevtk.xml is evtk.xml +