From 7852500d65af8cf035565f8ba4f9b613a4e4ea53 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sep 24 2016 00:01:52 +0000 Subject: Update to 3.3.0 --- diff --git a/.gitignore b/.gitignore index df9bbf8..1c477b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ +/.build-*-*.fc*.log /tables-2.3.1.tar.gz /tables-2.4.0.tar.gz /pytablesmanual-3.0.0.pdf /tables-3.0.0.tar.gz /tables-3.1.1.tar.gz -/pytablesmanual-3.1.1.pdf /PyTables-16191801a53eddae8ca9380a28988c3b5b263c5e.tar.gz /v.3.2.0.tar.gz -/pytablesmanual-3.2.0.pdf -/python-tables-3.2.2.tar.gz +/pytablesmanual-*.pdf +/python-tables-*.tar.gz +/pytablesmanual.pdf diff --git a/hdf5-blosc-1.4.4-1.6.1.diff b/hdf5-blosc-1.4.4-1.6.1.diff deleted file mode 100644 index bd6b2bb..0000000 --- a/hdf5-blosc-1.4.4-1.6.1.diff +++ /dev/null @@ -1,272 +0,0 @@ -diff --git a/c-blosc/hdf5/CMakeLists.txt b/c-blosc/hdf5/CMakeLists.txt -index d9cd847e89..d91194fcf7 100644 ---- a/c-blosc/hdf5/CMakeLists.txt -+++ b/c-blosc/hdf5/CMakeLists.txt -@@ -4,8 +4,19 @@ set(SOURCES blosc_filter.c) - include_directories("${PROJECT_SOURCE_DIR}/blosc") - - # dependencies --find_package(HDF5 REQUIRED) --include_directories(HDF5_INCLIDE_DIRS) -+if(MSVC) -+ # FindHDF5.cmake does not find Windows installations. Try to -+ # use an environment variable instead until the official "find" -+ # file can be updated for Windows. -+ # -+ # Note that you have to set this environment variable by hand. -+ file(TO_CMAKE_PATH "$ENV{HDF5_DIR}" HDF5_HINT) -+ set(HDF5_DIR ${HDF5_HINT} CACHE STRING "Path to HDF5 CMake config directory.") -+ find_package(HDF5 REQUIRED HINTS ${HDF5_DIR}) -+else(MSVC) -+ find_package(HDF5 REQUIRED) -+endif(MSVC) -+include_directories(${HDF5_INCLUDE_DIRS}) - - - # targets -@@ -17,16 +28,26 @@ if(BUILD_STATIC) - add_library(blosc_filter_static ${SOURCES}) - set_target_properties( - blosc_filter_static PROPERTIES OUTPUT_NAME blosc_filter) -- target_link_libraries(blosc_filter_static blosc_static) -+ target_link_libraries(blosc_filter_static blosc_static ${HDF5_LIBRARIES}) - endif(BUILD_STATIC) - -+# have to copy blosc dlls for Visual Studio -+if(MSVC) -+ add_custom_command( -+ TARGET blosc_filter_shared -+ POST_BUILD -+ COMMAND ${CMAKE_COMMAND} -+ ARGS -E copy_if_different -+ "${PROJECT_BINARY_DIR}/blosc/\$\(Configuration\)/blosc.dll" -+ "${CMAKE_CURRENT_BINARY_DIR}/\$\(Configuration\)/blosc.dll") -+endif(MSVC) - - # install - install(FILES blosc_filter.h DESTINATION include COMPONENT HDF5_FILTER_DEV) --install(TARGETS blosc_filter_static DESTINATION lib COMPONENT HDF5_FILTER) -+install(TARGETS blosc_filter_shared DESTINATION lib COMPONENT HDF5_FILTER) - if(BUILD_STATIC) - install( -- TARGETS blosc_filter_shared DESTINATION lib COMPONENT HDF5_FILTER_DEV) -+ TARGETS blosc_filter_static DESTINATION lib COMPONENT HDF5_FILTER_DEV) - endif(BUILD_STATIC) - - -diff --git a/c-blosc/hdf5/README.rst b/c-blosc/hdf5/README.rst -index 15c6b35fc0..7aae585b2a 100644 ---- a/c-blosc/hdf5/README.rst -+++ b/c-blosc/hdf5/README.rst -@@ -17,10 +17,16 @@ value is returned. - An example C program ("example.c") is included which demonstrates the - proper use of the filter. - -+Alternatively, instead of registering the Blosc filter, you can use the -+automatically detectable `HDF5 filter plugin`_ which is supported in HDF5 -+1.8.11 and later. -+ - This filter has been tested against HDF5 versions 1.6.5 through - 1.8.10. It is released under the MIT license (see LICENSE.txt for - details). - -+.. _`HDF5 filter plugin`: http://www.hdfgroup.org/HDF5/doc/Advanced/DynamicallyLoadedFilters/HDF5DynamicallyLoadedFilters.pdf -+ - - Compiling - ========= -@@ -50,13 +56,101 @@ Using Windows and MSVC (2008 or higher recommended): - - Intel ICC compilers should work too. - -+On Windows, you'll need to copy hdf5.dll and possibly the msvc*.dll files -+to your filter's directory if you do not have HDF5 installed in your PATH. -+ - For activating the support for other compressors than the integrated - BloscLZ (like LZ4, LZ4HC, Snappy or Zlib) see the README file in the - main Blosc directory. - - -+Compiling dynamically loadable filter plugin -+============================================ -+ -+Compile blosc_plugin.c and blosc_filter.c to a shared library and then -+let HDF5 know where to find it. -+ -+To complie using GCC on UNIX: -+ -+ gcc -O3 -msse2 -lhdf5 -lpthread ../blosc/*.c \ -+ blosc_filter.c blosc_plugin.c -fPIC -shared \ -+ -o libblosch5plugin.so -+ -+Then ether move the shared library to HDF5's default search location for -+plugins (on UNIX ``/usr/local/hdf5/lib/plugin``) or to a directory pointed to -+by the ``HDF5_PLUGIN_PATH`` environment variable. -+ -+ -+IMPORTANT WINDOWS NOTE -+====================== -+ -+On Windows, the configuration (Release vs. Debug) and Visual Studio version -+of HDF5 and the c-blosc filter must match EXACTLY or you will experience -+crashes. You should also ensure that the C run-time is dynamically linked -+to both HDF5 and c-blosc. -+ -+This is due to the way Microsoft implements its C library. On Windows, the -+standard C library is not a fundamental part of the operating system, as it -+is on Unix-like systems. Instead, the C library is implemented in separate -+shared libraries (dlls - called the C run-time (CRT) by Microsoft), which -+differ by Visual Studio and configuration. For example, msvcr110d.dll is the -+Visual Studio 2012 debug C run-time and msvcr90.dll is the Visual Studio -+2008 release C run-time. Since there is no shared state between these -+independent libraries, allocating memory in one library and freeing it in -+another (as the c-blosc HDF5 filter does) will corrupt the heap and cause -+crashes. -+ -+There is currently no way around this issue since a fix involves exposing -+the HDF5 library's memory management functions for filter author use, which -+would ensure that both the filter and HDF5 use the same allocation and -+free functions. The HDF Group is aware of the problem and hopes to have a -+fix in HDF5 1.8.15 (May 2015). -+ -+To duplicate the problem -+------------------------ -+ -+* Install the HDF5 binary distribution. The HDF5 binaries are built in release mode (even though they include debugging symbols) and link to the release C run-time. -+ -+* Configure and build c-blosc using the debug configuration. Ensure that CMake uses the installed release-configuration HDF5. -+ -+* You may need to copy hdf5.dll and the msvc*.dll libraries to the filter's binary directory if the HDF5 bin directory is not in your PATH. -+ -+* At this point, HDF5 will be using the release C run-time and c-blosc will be using the debug C run-time. You can confirm this using the Visual Studio tool 'dumpbin /imports'. -+ -+* Run example.exe. It should crash. -+ -+If you build the HDF5 library from source in the debug configuration, -+you can confirm that debug HDF5 and release c-blosc will also cause -+example.exe to fail. -+ -+Note that the crashes may not be deterministic. Your mileage may vary. -+Regardless of the behavior on your particular system, this is a serious -+problem and will crash many, if not most, systems. -+ -+To demonstrate proper behavior -+------------------------------ -+ -+* Build c-blosc in the configuration that matches HDF5. -+ -+* example.exe should now run normally. -+ -+To confirm that it is a C run-time mismatch issue, you can modify the -+src/H5.c and src/H5public.h files in the HDF5 source distribution to -+expose the HDF5 library's allocator (H5free_memory() already exists). -+Simply copy and modify the H5free_memory() function to something like -+H5malloc() that wraps malloc(). You'll need to run 'bin/trace src/H5.c' -+in the source root to generate a TRACE macro for the new API call -+(requires Perl). Modify the filter to use H5malloc() and H5free_memory() -+in place of malloc() and free() and rebuild c-blosc. You will now be -+able to combine release and debug configurations without example.exe -+crashing. -+ -+ - Acknowledgments - =============== - - This HDF5 filter interface and its example is based in the LZF interface - (http://h5py.alfven.org) by Andrew Collette. -+ -+Dana Robinson made nice improvements on existing CMake files for -+Windows/MSVC. -diff --git a/c-blosc/hdf5/blosc_filter.c b/c-blosc/hdf5/blosc_filter.c -index aa3521545d..3ab5237365 100644 ---- a/c-blosc/hdf5/blosc_filter.c -+++ b/c-blosc/hdf5/blosc_filter.c -@@ -105,7 +105,7 @@ herr_t blosc_set_local(hid_t dcpl, hid_t type, hid_t space){ - size_t nelements = 8; - unsigned int values[] = {0,0,0,0,0,0,0,0}; - hid_t super_type; -- H5T_class_t class; -+ H5T_class_t classt; - - r = GET_FILTER(dcpl, FILTER_BLOSC, &flags, &nelements, values, 0, NULL); - if(r<0) return -1; -@@ -126,8 +126,8 @@ herr_t blosc_set_local(hid_t dcpl, hid_t type, hid_t space){ - typesize = H5Tget_size(type); - if (typesize==0) return -1; - /* Get the size of the base type, even for ARRAY types */ -- class = H5Tget_class(type); -- if (class == H5T_ARRAY) { -+ classt = H5Tget_class(type); -+ if (classt == H5T_ARRAY) { - /* Get the array base component */ - super_type = H5Tget_super(type); - basetypesize = H5Tget_size(super_type); -@@ -175,7 +175,7 @@ size_t blosc_filter(unsigned flags, size_t cd_nelmts, - int doshuffle = 1; /* Shuffle default */ - int compcode; /* Blosc compressor */ - int code; -- char *compname = NULL; -+ char *compname = "blosclz"; /* The compressor by default */ - char *complist; - char errmsg[256]; - -@@ -234,10 +234,6 @@ size_t blosc_filter(unsigned flags, size_t cd_nelmts, - } - - #if ( (BLOSC_VERSION_MAJOR <= 1) && (BLOSC_VERSION_MINOR < 5) ) -- /* Select the correct compressor to use */ -- if (compname != NULL) -- blosc_set_compressor(compname); -- - status = blosc_compress(clevel, doshuffle, typesize, nbytes, - *buf, outbuf, nbytes); - #else -@@ -281,7 +277,7 @@ size_t blosc_filter(unsigned flags, size_t cd_nelmts, - } - - #if ( (BLOSC_VERSION_MAJOR <= 1) && (BLOSC_VERSION_MINOR < 5) ) -- status = blosc_decompress(*buf, outbuf, outbuf_size); -+ status = blosc_decompress(*buf, outbuf, outbuf_size); - #else - /* Starting from Blosc 1.5 on, there is not an internal global - lock anymore, so do not try to run in multithreading mode -diff --git a/c-blosc/hdf5/example.c b/c-blosc/hdf5/example.c -index 3b386e330d..d72b3fc7b8 100644 ---- a/c-blosc/hdf5/example.c -+++ b/c-blosc/hdf5/example.c -@@ -1,6 +1,6 @@ - /* - Copyright (C) 2010 Francesc Alted -- http://blosc.pytables.org -+ http://blosc.org - License: MIT (see LICENSE.txt) - - Example program demonstrating use of the Blosc filter from C code. -@@ -9,8 +9,7 @@ - - To compile this program: - -- h5cc [-DH5_USE_16_API] -lblosc blosc_filter.c example.c \ -- -o example -lpthread -+ h5cc blosc_filter.c example.c -o example -lblosc -lpthread - - To run: - -@@ -73,7 +72,7 @@ int main(){ - r = H5Pset_chunk(plist, 3, chunkshape); - if(r<0) goto failed; - -- /* Using the blosc filter in combianation with other ones also works */ -+ /* Using the blosc filter in combination with other ones also works */ - /* - r = H5Pset_fletcher32(plist); - if(r<0) goto failed; -@@ -81,7 +80,7 @@ int main(){ - - /* This is the easiest way to call Blosc with default values: 5 - for BloscLZ and shuffle active. */ -- /* r = H5Pset_filter(plist, FILTER_BLOSC, H5Z_FLAG_OPTIONAL, 0, NULL); */ -+ /* r = H5Pset_filter(plist, FILTER_BLOSC, H5Z_FLAG_OPTIONAL, 0, NULL); */ - - /* But you can also taylor Blosc parameters to your needs */ - /* 0 to 3 (inclusive) param slots are reserved. */ diff --git a/python-tables.spec b/python-tables.spec index 5243b5f..29ea43f 100644 --- a/python-tables.spec +++ b/python-tables.spec @@ -1,27 +1,20 @@ -# we don't want to provide private python extension libs in either the python2 or python3 dirs -%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ - -%global module tables - #global commit 16191801a53eddae8ca9380a28988c3b5b263c5e -#global shortcommit %(c=%{commit}; echo ${c:0:7}) +%{?gitcommit:%global gitcommitshort %(c=%{gitcommit}; echo ${c:0:7})} # Use the same directory of the main package for subpackage licence and docs %global _docdir_fmt %{name} -Summary: Hierarchical datasets in Python -Name: python-%{module} -Version: 3.2.2 -Release: 6%{?dist}%{?gitcommit:.git%{shortcommit}} +Summary: HDF5 support in Python +Name: python-tables +Version: 3.3.0 +Release: 1%{?dist}%{?gitcommit:.git%{shortcommit}} #Source0: https://github.com/PyTables/PyTables/archive/%{commit}/PyTables-%{commit}.tar.gz -Source0: https://github.com/PyTables/PyTables/archive/v.%{version}.tar.gz#/python-tables-%{version}.tar.gz +Source0: https://github.com/PyTables/PyTables/archive/v%{version}.tar.gz#/python-tables-%{version}.tar.gz -Source1: https://sourceforge.net/projects/pytables/files/pytables/3.2.0/pytablesmanual-3.2.0.pdf +Source1: https://github.com/PyTables/PyTables/releases/download/v%{version}/pytablesmanual-%{version}.pdf Patch0: always-use-blosc.diff -Patch1: hdf5-blosc-1.4.4-1.6.1.diff License: BSD -Group: Development/Languages URL: http://www.pytables.org BuildRequires: hdf5-devel >= 1.8 bzip2-devel lzo-devel @@ -30,36 +23,40 @@ BuildRequires: numpy BuildRequires: python-numexpr >= 2.4 BuildRequires: blosc-devel >= 1.5.2 BuildRequires: python2-devel +BuildRequires: python2-six +BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-Cython >= 0.13 BuildRequires: python%{python3_pkgversion}-numpy BuildRequires: python%{python3_pkgversion}-numexpr >= 2.4 -BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-six %description PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data. -%package -n python2-%{module} -Summary: Hierarchical datasets in Python +%package -n python2-tables +Summary: %{summary} Requires: numpy +Requires: python2-six Requires: python2-numexpr >= 2.4 -%{?python_provide:%python_provide python2-%{module}} +%{?python_provide:%python_provide python2-tables} -%description -n python2-%{module} +%description -n python2-tables PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data. This is the version for Python 2. -%package -n python%{python3_pkgversion}-%{module} -Summary: Hierarchical datasets in Python +%package -n python%{python3_pkgversion}-tables +Summary: %{summary} Requires: python%{python3_pkgversion}-numpy +Requires: python%{python3_pkgversion}-six Requires: python%{python3_pkgversion}-numexpr >= 2.4 -%{?python_provide:%python_provide python%{python3_pkgversion}-%{module}} +%{?python_provide:%python_provide python%{python3_pkgversion}-tables} -%description -n python%{python3_pkgversion}-%{module} +%description -n python%{python3_pkgversion}-tables PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data. @@ -74,13 +71,14 @@ BuildArch: noarch The %{name}-doc package contains the documentation for %{name}. %prep -%autosetup -n PyTables-v.%{version} -p1 +%autosetup -n PyTables-%{version} -p1 +cp -a %{SOURCE1} pytablesmanual.pdf + echo "import sys, tables; sys.exit(tables.test(verbose=1))" > bench/check_all.py + # Make sure we are not using anything from the bundled blosc by mistake find c-blosc -mindepth 1 -maxdepth 1 -name hdf5 -prune -o -exec rm -r {} + -cp -a %{SOURCE1} pytablesmanual.pdf - %build %py2_build %py3_build @@ -101,19 +99,19 @@ PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} bench/check_all.py PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} bench/check_all.py %endif -%files -n python2-%{module} +%files -n python2-tables %license LICENSE.txt LICENSES -%{python2_sitearch}/%{module} -%{python2_sitearch}/%{module}-%{version}*.egg-info +%{python2_sitearch}/tables +%{python2_sitearch}/tables-%{version}*.egg-info -%files -n python%{python3_pkgversion}-%{module} +%files -n python%{python3_pkgversion}-tables %license LICENSE.txt LICENSES %{_bindir}/ptdump %{_bindir}/ptrepack %{_bindir}/pt2to3 %{_bindir}/pttree -%{python3_sitearch}/%{module} -%{python3_sitearch}/%{module}-%{version}*.egg-info +%{python3_sitearch}/tables +%{python3_sitearch}/tables-%{version}*.egg-info %files doc %license LICENSE.txt LICENSES @@ -122,6 +120,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} bench/check_all.py %doc examples/ %changelog +* Thu Sep 15 2016 Zbigniew Jędrzejewski-Szmek - 3.3.0-1 +- Update to latest upstream version (#1352621) + * Tue Jul 19 2016 Fedora Release Engineering - 3.2.2-6 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages diff --git a/sources b/sources index 10a6290..b82cabb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -7cbb0972e4d6580f629996a5bed92441 python-tables-3.2.2.tar.gz -e9dea04353a75e979fa93b18a1595e6e pytablesmanual-3.2.0.pdf +056c161ae0fd2d6e585b766adacf3b0b python-tables-3.3.0.tar.gz +a2d0d3b5e3e45b6f4dc7d2f7f150c87d pytablesmanual-3.3.0.pdf