# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['ogscm', 'ogscm.app', 'ogscm.building_blocks', 'ogscm.recipes']

package_data = \
{'': ['*'], 'ogscm.recipes': ['files/*']}

install_requires = \
['PyYAML>=5.3.1,<6.0.0',
 'hpccm>=22.2.0,<23.0.0',
 'packaging>=20.4,<21.0',
 'requests>=2.24.0,<3.0.0']

entry_points = \
{'console_scripts': ['ogscm = ogscm.cli:main']}

setup_kwargs = {
    'name': 'ogscm',
    'version': '2.4.2',
    'description': 'OGS Container Maker',
    'long_description': "# OGS Container Maker\n\n[![PyPI version](https://badge.fury.io/py/ogscm.svg)](https://badge.fury.io/py/ogscm)\n\n## General usage\n\n### Installation\n\n```bash\nvirtualenv ~/.venv/ogs-container-maker\nsource ~/.venv/ogs-container-maker/bin/activate\npip install ogscm\n```\n\n### Generate container definition\n\nOGS Container Maker has builtin *recipes*. You need to specify the recipes to use as command arguments. Each of recipes adds options to the tool. Typically you want to start with a compiler. Add the `compiler.py` recipe and the `--help`-flag to get more options:\n\n```bash\n$ ogscm compiler.py --help\n...\ncompiler.py:\n  --compiler COMPILER   The compiler to use. Possible options: off, gcc,\n                        clang (default: gcc)\n  --compiler_version COMPILER_VERSION\n                        Compiler version. (default: )\n  --iwyy                Install include-what-you-use (requires clang\n                        compiler) (default: False)\n```\n\nAfter specifying the compiler recipe (and optionally setting a non-default compiler and version) you may want to add the `ogs.py` recipe:\n\n```bash\n$ ogscm compiler.py ogs.py --help\n...\nogs.py:\n  --pm {system,off}\n                        Package manager to install third-party dependencies\n                        (default: conan)\n  --ogs OGS             OGS repo on gitlab.opengeosys.org in the form\n                        'user/repo@branch' OR 'user/repo@@commit' to\n                        checkout a specific commit OR a path to a local\n                        subdirectory to the git cloned OGS sources OR 'off'\n                        to disable OGS building OR 'clean' to disable OGS\n                        and all its dev dependencies (default:\n                        ogs/ogs@master)\n  --cmake_args CMAKE_ARGS\n                        CMake argument set has to be quoted and **must**\n                        start with a space. e.g. --cmake_args '\n                        -DFIRST=TRUE -DFOO=BAR' (default: )\n...\n```\n\nPlease note that the order of the recipes given on the command line is important. The typical order for the current builtin recipes is `compiler.py mpi.py ogs.py ogs_jupyter.py`.\n\nTo generate a Dockerfile with the default parameters:\n\n```bash\n$ ogscm compiler.py ogs.py\nEvaluating compiler.py\nEvaluating ogs.py\nCreated definition _out/docker/gcc/default/ogs-d18c786e/conan/Dockerfile\n```\n\nWith some options (and the `mpi.py`-recipe):\n\n```bash\n$ ogscm compiler.py mpi.py ogs.py --ompi 4.0.5 --cmake_args ' -DOGS_BUILD_PROCESSES=LiquidFlow'\nEvaluating compiler.py\nEvaluating mpi.py\nEvaluating ogs.py\nCreated definition _out/docker/gcc/10/openmpi/4.0.5/ogs-d18c786e/conan/cmake-702517b3/Dockerfile\n```\n\n### Build image\n\nAdd the `--build`-flag.\n\nConvert Docker image to Singularity image:\n\nAdd the `--convert`-flag (requires Singularity 3.x).\n\n### Run\n\n```bash\ndocker run --it --rm ogs-ompi-2.1.3\n# in container:\nogs --version\n```\n\n```bash\nsingularity shell ogs-ompi-2.1.3.sif\n# in container:\nogs --version\n# OR directly run from host\nsingularity exec ogs-ompi-2.1.3.sif ogs local/path/to/square_1e0.prj\n```\n\n## All options\n\nAll options for current builtin recipes:\n\n```\n$ ogscm compiler.py mpi.py ogs.py --help\nEvaluating compiler.py\nEvaluating mpi.py\nEvaluating ogs.py\nusage: ogscm [-h] [--version] [--out OUT] [--file FILE] [--print] [--format {docker,singularity}] [--base_image BASE_IMAGE] [--runtime_base_image RUNTIME_BASE_IMAGE]\n             [--cpu-target {a64fx,aarch64,arm,broadwell,bulldozer,cannonlake,cascadelake,core2,excavator,haswell,i686,icelake,ivybridge,k10,mic_knl,nehalem,nocona,pentium2,pentium3,pentium4,piledriver,power7,power8,power8le,power9,power9le,ppc,ppc64,ppc64le,ppcle,prescott,sandybridge,skylake,skylake_avx512,sparc,sparc64,steamroller,thunderx2,westmere,x86,x86_64,zen,zen2}]\n             [--build] [--build_args BUILD_ARGS] [--upload] [--registry REGISTRY] [--tag TAG] [--convert] [--sif_file SIF_FILE] [--convert-enroot] [--enroot-bundle] [--enroot_file ENROOT_FILE] [--force]\n             [--runtime-only] [--clean] [--deploy [DEPLOY]] [--pip [package ...]] [--packages [packages ...]] [--compiler COMPILER] [--compiler_version COMPILER_VERSION] [--fortran] [--iwyy] [--ompi OMPI]\n             [--mpi_benchmarks] [--mpi_no_entrypoint] [--pm {system,off}] [--ogs OGS] [--cmake_args CMAKE_ARGS] [--cmake_preset CMAKE_PRESET] [--cmake_preset_file CMAKE_PRESET_FILE] [--ccache]\n             [--cpmcache] [--parallel PARALLEL] [--gui] [--docs] [--cvode] [--cppcheck] [--gcovr] [--mfront] [--insitu] [--dev] [--mkl] [--petsc_configure_args PETSC_CONFIGURE_ARGS]\n             [--version_file VERSION_FILE] [--boost-sourceforge] [--keep-ogs-source] [--keep-ogs-build] [--run-ctest]\n             recipe [recipe ...]\n\npositional arguments:\n  recipe\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --version             show program's version number and exit\n  --out OUT             Output directory (default: _out)\n  --file FILE           Overwrite output recipe file name (default: )\n  --print, -P           Print the definition to stdout (default: False)\n\nGeneral image config:\n  --format {docker,singularity}\n  --base_image BASE_IMAGE\n                        The base image. (default: ubuntu:20.04)\n  --runtime_base_image RUNTIME_BASE_IMAGE\n                        The runtime base image. (default: )\n  --cpu-target {a64fx,aarch64,arm,broadwell,bulldozer,cannonlake,cascadelake,core2,excavator,haswell,i686,icelake,ivybridge,k10,mic_knl,nehalem,nocona,pentium2,pentium3,pentium4,piledriver,power7,power8,power8le,power9,power9le,ppc,ppc64,ppc64le,ppcle,prescott,sandybridge,skylake,skylake_avx512,sparc,sparc64,steamroller,thunderx2,westmere,x86,x86_64,zen,zen2}\n                        The CPU microarchitecture to optimize for (archspec). (default: ivybridge)\n\nImage build options:\n  --build, -B           Build the images from the definition files (default: False)\n  --build_args BUILD_ARGS\n                        Arguments to the build command. Have to be quoted and **must** start with a space. E.g. --build_args ' --no-cache' (default: )\n  --upload, -U          Upload Docker image to registry (default: False)\n  --registry REGISTRY   The docker registry the image is tagged and uploaded to. (default: registry.opengeosys.org/ogs/ogs)\n  --tag TAG             The full docker image tag. Overwrites --registry. (default: )\n  --convert, -C         Convert Docker image to Singularity image (default: False)\n  --sif_file SIF_FILE   Overwrite output singularity image file name (default: )\n  --convert-enroot, -E  Convert Docker image to enroot image (default: False)\n  --enroot-bundle       Convert enroot image to enroot bundle (default: False)\n  --enroot_file ENROOT_FILE\n                        Overwrite output enroot image file name (default: )\n  --force               Forces overwriting of image files! (default: False)\n  --runtime-only, -R    Generate multi-stage Dockerfiles for small runtime images (default: False)\n\nMaintenance:\n  --clean               Cleans up generated files in default directories. (default: False)\n\nImage deployment:\n  --deploy [DEPLOY], -D [DEPLOY]\n                        Deploys to all configured hosts (in config/deploy_hosts.yml) with no additional arguments or to the specified host. Implies --build and --convert arguments. (default: )\n\nPackages to install:\n  --pip [package ...]   Install additional Python packages (default: [])\n  --packages [packages ...]\n                        Install additional OS packages (default: [])\n\ncompiler.py:\n  --compiler COMPILER   The compiler to use. Possible options: off, gcc, clang (default: gcc)\n  --compiler_version COMPILER_VERSION\n                        Compiler version. (default: )\n  --fortran             Install fortran compiler. (default: False)\n  --iwyy                Install include-what-you-use (requires clang compiler) (default: False)\n\nmpi.py:\n  --ompi OMPI           OpenMPI version, e.g. 2.1.1, 2.1.5, 3.0.1, 3.1.2 (default: 4.0.6)\n  --mpi_benchmarks      Installs OSU MPI benchmarks and mpi_bw, mpi_ring, mpi_hello (default: False)\n  --mpi_no_entrypoint   Disables mpi entrypoint. (Use with ogs_jupyter.py recipe) (default: False)\n\nogs.py:\n  --pm {system,off}     Package manager to install third-party dependencies (default: system)\n  --ogs OGS             OGS repo on gitlab.opengeosys.org in the form 'user/repo@branch' OR 'user/repo@@commit' to checkout a specific commit OR a path to a local subdirectory to the git cloned OGS\n                        sources OR 'off' to disable OGS building OR 'clean' to disable OGS and all its dev dependencies (default: ogs/ogs@master)\n  --cmake_args CMAKE_ARGS\n                        CMake argument set has to be quoted and **must** start with a space. e.g. --cmake_args ' -DFIRST=TRUE -DFOO=BAR' (default: )\n  --cmake_preset CMAKE_PRESET\n                        A CMake configuration preset to use. (default: release)\n  --cmake_preset_file CMAKE_PRESET_FILE\n                        A CMake (user) presets file as a local file path. (default: None)\n  --ccache              Enables ccache build caching. (Docker-only) (default: False)\n  --cpmcache            Enables CPM source caching. (Docker-only) (default: False)\n  --parallel PARALLEL, -j PARALLEL\n                        The number of cores to use for compilation. (default: 8)\n  --gui                 Builds the GUI (Data Explorer) (default: False)\n  --docs                Setup documentation requirements (Doxygen) (default: False)\n  --cvode               Install and configure with cvode (default: False)\n  --cppcheck            Install cppcheck (default: False)\n  --gcovr               Install gcovr (default: False)\n  --mfront              Install tfel and build OGS with -DOGS_USE_MFRONT=ON (default: False)\n  --insitu              Builds with insitu capabilities (default: False)\n  --dev                 Installs development tools (vim, gdb) (default: False)\n  --mkl                 Use MKL. By setting this option, you agree to the [Intel End User License Agreement](https://software.intel.com/en-us/articles/end-user-license-agreement). (default: False)\n  --petsc_configure_args PETSC_CONFIGURE_ARGS\n                        PETSc configuration arguments; has to be quoted. (default: --with-fc=0 --download-f2cblaslapack=1)\n  --version_file VERSION_FILE\n                        OGS versions.json file (default: None)\n  --boost-sourceforge   Boolean flag to specify whether Boost should be downloaded from SourceForge rather than the current Boost repository. (default: False)\n  --keep-ogs-source     Boolean flag to specify whether the OGS source directory should be preserved. (default: False)\n  --keep-ogs-build      Boolean flag to specify whether the OGS build directory should be preserved. (default: False)\n  --run-ctest           Boolean flag to specify whether to run the OGS ctest-target. (default: False)\n```\n\n## Advanced usage\n\n### Build OGS from local git repo\n\nYou can use the ogs-container-maker to build a container image from your current source code on your host machine:\n\n```\nvirtualenv .venv\nsource .venv/bin/activate\npip install ogscm\nogscm compiler.py ogs.py -B -C -R --ogs [path to ogs sources]\n```\n\n### Deploy image files\n\n- Requires `rsync`\n- Rename the file `config/deploy_hosts_example.yml` to `config/deploy_hosts.yml`\n- `host` has to be a SSH host to which you have passwordless access\n- Deploy to the host with `... -D myhost`\n\n\n## PyPi Publication\n\n- Bump version in `pyproject.py` and run `poetry install`\n- Create tag\n- Push to GitLab (`git push --tags`)\n",
    'author': 'Lars Bilke',
    'author_email': 'lars.bilke@ufz.de',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://gitlab.opengeosys.org/ogs/container-maker',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.7,<4.0',
}


setup(**setup_kwargs)
