移植bsddb3

操作步骤

  1. 使用PuTTY工具,以root用户登录服务器。
  2. 执行以下命令,创建bsddb3构建环境。

    conda create -n conda_build conda-build python=3.7.12 -c conda-forge

  3. 执行以下命令,激活构建环境。

    conda activate conda_build

  4. 执行以下命令,上传conda文件。

    1. 创建“bsddb3”目录。
      mkdir bsddb3
    2. 将“meta.yaml”和“build.sh”通过SFTP工具上传到bsddb3目录下。
      • meta.yaml内容如下:
        package:
        name: bsddb3
        version: 6.2.9
        source:
        git_url: https://github.com/wchangque/bsddb3.git
        build:
        number: '1'
        string: py37_0
        requirements:
        build:
        - _libgcc_mutex 0.1
        - _openmp_mutex 4.5
        - binutils_impl_linux-aarch64
        - binutils_linux-aarch64 2.36
        - gcc_impl_linux-aarch64 9.4.0
        - gcc_linux-aarch64 9.4.0
        - kernel-headers_linux-aarch64 4.18.0
        - ld_impl_linux-aarch64 2.36.1
        - libgcc-devel_linux-aarch64 9.4.0
        - libgcc-ng 11.2.0
        - libgomp 11.2.0
        - libsanitizer 9.4.0
        - libstdcxx-ng 11.2.0
        - sysroot_linux-aarch64 2.17
        host:
        - _libgcc_mutex 0.1
        - _openmp_mutex 4.5
        - ca-certificates 2021.10.8
        - ld_impl_linux-aarch64 2.36.1
        - libdb 6.2.32
        - libffi 3.4.2
        - libgcc-ng 11.2.0
        - libgomp 11.2.0
        - libnsl 2.0.0
        - libstdcxx-ng 11.2.0
        - libzlib 1.2.11
        - ncurses 6.2
        - openssl 3.0.0
        - pip 21.3.1
        - python 3.7.12
        - python_abi 3.7
        - readline 8.1
        - setuptools 58.5.3
        - sqlite 3.36.0
        - tk 8.6.11
        - wheel 0.37.0
        - xz 5.2.5
        - zlib 1.2.11
        run:
        - libdb >=6.2.32,<6.3.0a0
        - libgcc-ng >=9.4.0
        - python >=3.7,<3.8.0a0
        - python_abi 3.7.* *_cp37m
        test:
        imports:
        - bsddb3
        about:
        description: 'This module provides a nearly complete wrapping of the Oracle/Sleepycat
        C API for the Database Environment,
        Database, Cursor, Log Cursor, Sequence and Transaction objects,
        and each of these is exposed as a Python type in the bsddb3.db module.
        The database objects can use various access methods: btree, hash, recno, and queue.
        Complete support of Berkeley DB distributed transactions.
        Complete support for Berkeley DB Replication Manager.
        Complete support for Berkeley DB Base Replication. Support for RPC.
        '
        doc_url: https://www.jcea.es/programacion/pybsddb_doc/
        home: https://www.jcea.es/programacion/pybsddb.htm
        license: BSD-3-Clause
        license_family: BSD
        license_file: LICENSE.txt
        summary: Python bindings for Oracle Berkeley DB
        extra:
        copy_test_source_files: true
        final: true
        recipe-maintainers:
        - shadowwalkersb
      • build.sh内容如下:
        #!/usr/bin/env bash
        export YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=1
        BERKELEYDB_DIR=$PREFIX $PYTHON -m pip install . --no-deps --ignore-installed

  5. 执行以下命令,构建bsddb3本地conda包。

    在bsddb3的同目录下新建构建目录。

    mkdir build
    export CONDA_BLD_PATH=build
    conda build -c conda-forge bsddb3/

    出现如下界面构建成功。

    最终需要的包在build/linux-aarch64/路径下。