Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ git:

matrix:
include:
- python: 2.7
os: linux
env: BUILD_COMMAND=sdist

- python: 3.4
os: linux
env: BUILD_COMMAND=sdist

- python: 3.5
os: linux
env: BUILD_COMMAND=sdist

- language: generic
os: osx
env: BUILD_COMMAND=bdist_wheel
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
1.3.0
-----

- Add 64-bit manylinux version LZ4 filter plugin

- Add 64-bit manylinux version bitshuffle plugin

- Implement continuous imtegration testing


1.2.0
-----

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ hdf5plugin

This module provides HDF5 plugins and sets the HDF5_PLUGIN_PATH to the appropriate value according to the version of python used.

The module is mainly intended for use under windows but shared libraries for MacOS are also provided.
The module is mainly intended for use under windows but shared libraries for MacOS and manylinux are also provided.

The LZ4 plugin sources were obtained from https://github.com/nexusformat/HDF5-External-Filter-Plugins

Expand All @@ -12,7 +12,7 @@ The bitshuffle plugin sources were obtained from https://github.com/kiyo-masui/b
Known issues
------------

Under MacOS, the bitshuffle plugin is limited to decompression (i.e. it can be used to read bitshuffle compressed data).
Under MacOS and linux, the bitshuffle plugin is limited to decompression (i.e. it can be used to read bitshuffle compressed data).


Installation
Expand Down
16 changes: 14 additions & 2 deletions hdf5plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,21 @@
import os
import sys


if sys.platform.startswith("darwin"):
compiler = "darwin"
arch = None
path_separator = ":"
elif sys.platform.startswith("linux"):
if sys.maxsize > 2**32:
# 64 bit
arch = "x86_64"
compiler = "manylinux"
else:
# 32 bit
arch = None
compiler = None
path_separator = ":"
elif sys.platform.startswith("win"):
if sys.version.startswith("3.5"):
compiler = "VS2015"
Expand All @@ -48,6 +60,7 @@
else:
# 32 bit
arch = "x86"
path_separator = ";"
else:
compiler = None

Expand All @@ -64,5 +77,4 @@
if current_path is None:
os.environ["HDF5_PLUGIN_PATH"] = plugin_path
else:
os.environ["HDF5_PLUGIN_PATH"] = current_path + ";" + plugin_path

os.environ["HDF5_PLUGIN_PATH"] = current_path + path_separator + plugin_path
Binary file added hdf5plugin/manylinux/x86_64/libH5Zlz4.so
Binary file not shown.
Binary file added hdf5plugin/manylinux/x86_64/libH5bshuf.so
Binary file not shown.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
# ###########################################################################*/
__authors__ = ["V.A. Sole"]
__license__ = "MIT"
__date__ = "25/08/2016"
__date__ = "30/11/2016"

from setuptools import setup

version="1.2.0"
version="1.3.0"
name = "hdf5plugin"
author = "ESRF - Data Analysis Unit"
description = "HDF5 Plugins for windows (and MacOS)"
description = "HDF5 Plugins for windows,MacOS and linux"
f = open("README.rst")
long_description=f.read()
f.close()
Expand All @@ -43,6 +43,7 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 2.7",
Expand All @@ -53,7 +54,8 @@
]
package_data = {'hdf5plugin': ["VS2008/x86/*" ,"VS2008/x64/*",
"VS2015/x86/*", "VS2015/x64/*",
"darwin/*"]}
"darwin/*",
"manylinux/x86_64/*"]}

if __name__ == "__main__":
setup(name=name,
Expand Down
17 changes: 15 additions & 2 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
import os
import sys
import unittest
from distutils.version import LooseVersion

class TestHDF5Plugin(unittest.TestCase):
def setUp(self):
if "hdf5plugin" not in sys.modules:
self.assertFalse("h5py" in sys.modules)
import hdf5plugin


def tearDown(self):
pass
Expand All @@ -45,6 +47,9 @@ def testHDF5PluginImport(self):

def testLZ4(self):
import h5py
version = h5py.version.hdf5_version
if LooseVersion(version) < LooseVersion("1.8.11"):
self.skipTest("HDF5 %s Version is lower than 1.8.11" % version)
dirname = os.path.abspath(os.path.dirname(__file__))
fname = os.path.join(dirname, "lz4.h5")
self.assertTrue(os.path.exists(fname),
Expand All @@ -60,6 +65,9 @@ def testLZ4(self):

def testBitshuffle(self):
import h5py
version = h5py.version.hdf5_version
if LooseVersion(version) < LooseVersion("1.8.11"):
self.skipTest("HDF5 %s Version is lower than 1.8.11" % version)
dirname = os.path.abspath(os.path.dirname(__file__))
fname = os.path.join(dirname, "bitshuffle.h5")
self.assertTrue(os.path.exists(fname),
Expand All @@ -86,7 +94,12 @@ def getSuite(auto=True):
return testSuite

def test(auto=False):
unittest.TextTestRunner(verbosity=2).run(getSuite(auto=auto))
result = unittest.TextTestRunner(verbosity=2).run(getSuite(auto=auto))
return(result)

if __name__ == "__main__":
test()
result = test()
if result.wasSuccessful():
sys.exit(0)
else:
sys.exit(1)