Skip to main content

用于安装 BOUT++ 及其依赖项的 Python 包

项目描述

测试 码头工人 编解码器 pypi 包 Python PEP8 执照

回合安装

用于安装BOUT++及其依赖项的 Python 包。

注意:这个包是作为安装 BOUT++ 的“最后手段”,例如当你不是root用户,并且你试图在一个“棘手”的系统上安装时。否则,可以使用docker轻松安装 BOUT++, 或者按照 BOUT++文档中的说明进行安装 。

入门

bout_install是一个轻量级的软件包,只需要python3, requests和 Internet 连接即可运行。

构建BOUT++和依赖可以通过执行来完成

from bout_install import install_bout
install_bout(config_path=None, add_to_bashrc=False)

或从命令行

bout_install --help

返回

usage: bout_install [-h] [-c CONFIG] [-a]

Install BOUT++ with dependencies

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Path to the configuration file. Default is
                        /path/to/bout_install/bout_install/config.ini
  -a, --add_to_bashrc   If set, paths to binaries and libraries of
                        dependencies will be added to .bashrc. Default is
                        false

这将根据以下内容构建 BOUT++ 及其依赖项 config.ini

[bout_options]
# Let these be empty for default behavior
# Read docstring of InstallerUsingGit.InstallerUsingGit.__init__ for details
# NOTE: Commit 8567b2d5bb5f4b70face0b8d0849fc1bbafbbdb0 is known to work
git_dir =
checkout =
enable_checks = no
enable_optimize = 3

[install_options]
# If packages not residing in local should be used
use_preinstalled = false
# Let these be empty for default behavior
# Read docstring of Installer.Installer.setup_install_dirs for details
main_dir =
install_dir =
local_dir =
examples_dir =

[required]
fftw = true
hdf5 = true
mpi = true
netcdf = true

[optional]
cmake = false
ffmpeg = false
gcc = false
slepc = true
sundials = true
# NOTE: PETSc is installed if slepc is true
petsc = false

[versions]
cmake = 3.7.2
ffmpeg = 3.1.4
fftw = 3.3.6-pl2
gcc = 6.1.0
hdf5 = 1.10.1
mpi = 3.2
nasm = 2.13.03
netcdf = 4.4.1.1
netcdf_cxx = 4.3.0
# NOTE: Only certain PETSc versions are supported by BOUT++
petsc = 3.10.0
# NOTE: Sundials 2.7.0 have given openmp problems
sundials = 2.6.2
# NOTE: Must correspond to the PETSc version
slepc = 3.10.0
yasm = 1.3.0
x264 = x264-snapshot-20180709-2245-stable

从 pip 安装

该软件包可以从以下位置安装pip

pip install bout-install

从源安装

或者,它可以从源代码安装

python setup.py install

运行测试

测试套件可以通过pytest或通过执行codecov pytest-cov。通过安装

pip install pytest

或者

pip install codecov pytest-cov

并运行

pytest

或者

pytest --cov=./

分别

注意:由于使用 Travis 进行自动测试的时间限制,单元测试已通过添加“.”来“屏蔽”。在名字前面。这样pytest会忽略那些测试。通过删除前导“.”来“取消盲目”它们。为了运行它们。

执照

这个项目是在 GNU Lesser General Public License 下获得许可的 - 请参阅 LICENSE文件了解详细信息

致谢

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

bout_install-0.1.9.tar.gz (23.8 kB 查看哈希

已上传 source

内置分布

bout_install-0.1.9-py3-none-any.whl (34.4 kB 查看哈希

已上传 py3