diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d3be137..424d1d1 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "aimrocks" %} -{% set version = "0.2.1" %} +{% set version = "0.3.1" %} package: name: {{ name|lower }} @@ -7,13 +7,10 @@ package: source: url: https://github.com/aimhubio/aimrocks/archive/refs/tags/v{{ version }}.tar.gz - sha256: c30ff542ba95cd615616cec07061f33e8385ebd131801fc2cdaf83010241a469 - - patches: - - setup_rocksdb.patch + sha256: b63e7f8c596d410cf7623632535e7fa32a2dda228934a24e8ffd5299febba9a4 build: - number: 3 + number: 0 skip: true # [win] requirements: diff --git a/recipe/recipe-scripts-license.txt b/recipe/recipe-scripts-license.txt new file mode 100644 index 0000000..2ec51d7 --- /dev/null +++ b/recipe/recipe-scripts-license.txt @@ -0,0 +1,27 @@ +BSD-3-Clause license +Copyright (c) 2015-2022, 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 REGENTS 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. diff --git a/recipe/setup_rocksdb.patch b/recipe/setup_rocksdb.patch deleted file mode 100644 index a36bc61..0000000 --- a/recipe/setup_rocksdb.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff --git a/setup.py b/setup.py -index a6ba6e3..5cced9b 100644 ---- a/setup.py -+++ b/setup.py -@@ -37,12 +37,15 @@ else: - aimrocks_extra_link_args += ["-Wl,-rpath,$ORIGIN"] - - third_party_install_dir = os.environ.get('AIM_DEP_DIR', '/usr/local') -+ -+# By default aimrocks is only linked to rocksdb. - third_party_deps = ['rocksdb'] - --third_party_lib_dir = os.path.join(third_party_install_dir, 'lib') --third_party_libs = glob(os.path.join(third_party_lib_dir, 'librocksdb.*')) -+# `AIMROCKS_LINK_LIBS` can be used to link against additional libraries. -+if os.environ.get("AIMROCKS_LINK_LIBS") is not None: -+ third_party_deps += os.environ.get("AIMROCKS_LINK_LIBS", "").split(",") - --third_party_headers = [os.path.join(third_party_install_dir, 'include/rocksdb')] -+third_party_lib_dir = os.path.join(third_party_install_dir, 'lib') - - # We define a local include directory to store all the required public headers. - # The third party headers are copied into this directory to enable binding with -@@ -54,17 +57,25 @@ local_lib_dir = os.path.abspath( - os.path.join(os.path.dirname(__file__), 'src/aimrocks') - ) - --print('third party libs detected:', third_party_libs) --for source in third_party_libs: -- print('copying third party lib', source, local_lib_dir) -- copy_file(source, local_lib_dir) -+if os.environ.get("AIMROCKS_EMBED_ROCKSDB", "1") == "1": - --for source in third_party_headers: -- basename = os.path.basename(source) -- destination = os.path.join(local_include_dir, basename) -- copy_tree(source, destination, -- preserve_symlinks=False, update=True) -+ third_party_libs = glob(os.path.join(third_party_lib_dir, 'librocksdb.*')) - -+ print('third party libs detected:', third_party_libs) -+ for source in third_party_libs: -+ print('copying third party lib', source, local_lib_dir) -+ copy_file(source, local_lib_dir) -+ -+ third_party_headers = [os.path.join(third_party_install_dir, 'include/rocksdb')] -+ for source in third_party_headers: -+ basename = os.path.basename(source) -+ destination = os.path.join(local_include_dir, basename) -+ copy_tree(source, destination, -+ preserve_symlinks=False, update=True) -+ -+# `include_dirs` is used to specify the include directories for the extension. -+# It contains the aimrocks local headers and the rocksdb ones. -+include_dirs = [os.path.join(third_party_install_dir, 'include/'), local_include_dir] - - exts = [ - Extension( -@@ -73,13 +84,12 @@ exts = [ - extra_compile_args=aimrocks_extra_compile_args, - extra_link_args=aimrocks_extra_link_args, - language='c++', -- include_dirs=[local_include_dir], -+ include_dirs=include_dirs, - library_dirs=[third_party_lib_dir], -- libraries=['rocksdb'], -+ libraries=third_party_deps, - ) - ] - -- - setup( - name="aimrocks", - version='0.2.1',