Commit 5a1d328c authored by Vincent POLLET's avatar Vincent POLLET

Add pytables recipe from defaults channel

parent 74b4537c
Pipeline #47236 failed with stage
in 19 minutes and 5 seconds
BSD 3-clause license
Copyright (c) 2015-2020, conda-forge contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set HDF5_DIR=%LIBRARY_PREFIX%
set BZIP2_DIR=%LIBRARY_PREFIX%
%PYTHON% setup.py install --hdf5=%LIBRARY_PREFIX% ^
--bzip2=%LIBRARY_PREFIX% ^
--lzo=%LIBRARY_PREFIX% ^
--blosc=%LIBRARY_PREFIX% ^
--single-version-externally-managed --record record.txt
if errorlevel 1 exit 1
#!/bin/bash
export BZIP2_DIR=$PREFIX
export HDF5_DIR=$PREFIX
export LZO_DIR=$PREFIX
export BLOSC_DIR=$PREFIX
$PYTHON -m pip install --no-deps --no-cache-dir --ignore-installed .
diff --git a/setup.py b/setup.py
index 5020d0a..1dfca70 100755
--- a/setup.py
+++ b/setup.py
@@ -817,12 +817,6 @@ if __name__ == '__main__':
name = find_name()
- if os.name == "nt":
- # Add DLL's to the final package for windows
- data_files.extend([
- ('Lib/site-packages/%s' % name, dll_files),
- ])
-
ADDLIBS = [hdf5_package.library_name]
# List of Blosc file dependencies
{% set version = "3.6.1" %}
package:
name: pytables
version: {{ version }}
source:
url: https://pypi.io/packages/source/t/tables/tables-{{ version }}.tar.gz
sha256: 49a972b8a7c27a8a173aeb05f67acb45fe608b64cd8e9fa667c0962a60b71b49
patches:
- do_not_copy_dlls_into_package.patch
- remove_dll_check.patch
build:
number: 0
entry_points:
- pt2to3 = tables.scripts.pt2to3:main
- ptdump = tables.scripts.ptdump:main
- ptrepack = tables.scripts.ptrepack:main
- pttree = tables.scripts.pttree:main
skip: true # [py<35]
ignore_run_exports:
- zlib
- lzo # [win]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- python {{ python }}
- pip
- cython
- numpy-devel {{ numpy }}
- zlib {{ zlib }}
- lzo
- bzip2
- hdf5 {{ hdf5 }}
- numexpr
- blosc
run:
- {{ pin_compatible('python') }}
- {{ pin_compatible('six') }}
- {{ pin_compatible('numexpr') }}
- {{ pin_compatible('hdf5') }}
- {{ pin_compatible('zlib') }}
- {{ pin_compatible('lzo') }}
- {{ pin_compatible('bzip2') }}
- {{ pin_compatible('blosc') }}
- mock
test:
requires:
- setuptools
- mock
commands:
- pt2to3 -h
- ptdump -h
- ptrepack -h
- pttree -h
about:
home: http://www.pytables.org
license: BSD 3-Clause
license_file: LICENSE.txt
summary: 'Brings together Python, HDF5 and NumPy to easily handle large amounts of data.'
description: |
PyTables is a package for managing hierarchical datasets and designed to
efficiently and easily cope with extremely large amounts of data. PyTables
is built on top of the HDF5 library, using the Python language and the
NumPy package.
doc_url: http://www.pytables.org/
dev_url: https://github.com/PyTables
extra:
recipe-maintainers:
- msarahan
- ocefpaf
- tomkooij
- scopatz
diff --git a/tables/__init__.py b/tables/__init__.py
index 5c2430a..782e085 100644
--- a/tables/__init__.py
+++ b/tables/__init__.py
@@ -20,81 +20,6 @@ to efficiently cope with extremely large amounts of data.
"""
-import os
-import sys
-
-
-# On Windows, pre-load the HDF5 DLLs into the process via Ctypes
-# to improve diagnostics and avoid issues when loading DLLs during runtime.
-# However, if running from a frozen app (via PyInstaller), skip the check.
-if os.name == 'nt' and not getattr(sys, 'frozen', False):
- import ctypes
-
- def _load_library(dllname, loadfunction, dllpaths=('', )):
- """Load a DLL via ctypes load function. Return None on failure.
-
- By default, try to load the DLL from the current package
- directory first, then from the Windows DLL search path.
-
- Python >= 3.8 no longer searches PATH for DLLs. Skip PATH modification
- on Python >= 3.8.
-
- """
- try:
- dllpaths = (os.path.abspath(
- os.path.dirname(__file__)), ) + dllpaths
- except NameError:
- pass # PyPy and frozen distributions have no __file__ attribute
- oldenv = None
- for path in dllpaths:
- if path and sys.version_info < (3, 8):
- # Temporarily add the path to the PATH environment variable
- # so Windows can find additional DLL dependencies.
- try:
- oldenv = os.environ['PATH']
- os.environ['PATH'] = path + ';' + oldenv
- except KeyError:
- oldenv = None
- try:
- return loadfunction(os.path.join(path, dllname))
- except WindowsError:
- pass
- finally:
- if path and oldenv is not None:
- os.environ['PATH'] = oldenv
- return None
-
- # In order to improve diagnosis of a common Windows dependency
- # issue, we explicitly test that we can load the HDF5 dll before
- # loading tables.utilsextensions.
- import sys
- hdf5_dlls = ['hdf5.dll', 'hdf5dll.dll', 'pytables_hdf5.dll']
- if hasattr(sys, 'gettotalrefcount'): # running with debug interpreter
- hdf5_dlls = ['hdf5_D.dll', 'hdf5ddll.dll']
- for dll in hdf5_dlls:
- if _load_library(dll, ctypes.cdll.LoadLibrary):
- break
- else:
- if sys.version_info < (3, 8):
- dll_loc = 'can be found in the system path'
- else:
- dll_loc = 'is installed in the package folder'
- raise ImportError(
- 'Could not load any of %s, please ensure that it %s.' % (hdf5_dlls, dll_loc))
-
- # Some PyTables binary distributions place the dependency DLLs in the
- # tables package directory.
- # The lzo2 and libbz2 DLLs are loaded dynamically at runtime but can't be
- # found because the package directory is not in the Windows DLL search
- # path.
- # This pre-loads lzo2 and libbz2 DLLs from the tables package directory.
- if not _load_library('lzo2.dll', ctypes.cdll.LoadLibrary):
- pass
-
- if not _load_library('libbz2.dll', ctypes.cdll.LoadLibrary):
- pass
-
-
# Necessary imports to get versions stored on the cython extension
from .utilsextension import (
get_pytables_version, get_hdf5_version, blosc_compressor_list,
import sys
import os
import tables
import tables._comp_bzip2
# We don't build this one on Windows.
if not sys.platform == "win32":
import tables._comp_lzo
import tables.hdf5extension
import tables.indexesextension
import tables.linkextension
import tables.lrucacheextension
import tables.tableextension
import tables.utilsextension
if __name__ == "__main__":
from multiprocessing import freeze_support
freeze_support()
tables.test()
conda/opencv
conda/pytables
conda/zc.buildout
conda/zc.recipe.egg
conda/schema
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment