{% set version = "7.32.4" %}

package:
  name: snakemake
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/s/snakemake/snakemake-{{ version }}.tar.gz
  sha256: fdc3f15dd7b06fabb7da30d460e0a3b1fba08e4ea91f9c32c47a83705cdc7b6e

build:
  number: 1
  noarch: generic
  run_exports:
    - {{ pin_subpackage("snakemake", max_pin="x") }}

requirements:
  run:
    - snakemake-minimal ={{ version }}
    # optional dependencies needed for the full experience
    # require this dropbox version to ensure that a conda doesn't pick up the
    # outdated version available
    - dropbox >=7.2.1
    - ftputil >=3.2
    - filechunkio >=1.6
    - pysftp >=0.2.8
    - aioeasywebdav
    # pandas is optional, but required for many workflows
    - pandas
    - python-irodsclient
    # aws s3
    - boto3
    # check snakemake/setup.cfg's section [options.extras_require]
    # options.extras_require: google-cloud
    - google-cloud-storage
    - google-api-python-client
    - google-crc32c
    - oauth2client
    # options.extras_require: messaging
    - slacker
    # options.extras_require: pep
    - eido
    - peppy
    # options.extras_require: reports
    - pygments

test:
  imports:
    - snakemake
  commands:
    - export GIT\_PYTHON_REFRESH=warn
    - snakemake --version
    - snakemake --version | grep "{{ version }}"
    # Generate a report to check whether graphviz dependencies (libXau) are properly installed:
    - 'printf %s\\n "rule empty:" > Snakefile && snakemake --cores 1 --report'
    # Remove test artifacts from command above.
    - rm -rf .snakemake Snakefile report.html

about:
  home: https://snakemake.github.io
  license: MIT
  summary: A popular workflow management system aiming at full in-silico reproducibility.
  description: |
        Snakemake is a workflow management system that aims to reduce the complexity of creating 
        workflows by providing a fast and comfortable execution environment, together with a clean 
        and modern specification language in python style. Snakemake workflows are essentially Python 
        scripts extended by declarative code to define rules. Rules describe how to create output 
        files from input files.

extra:
  identifiers:
    - doi:10.1093/bioinformatics/bts480
    - biotools:Snakemake
  skip-lints:
    - uses_setuptools  # uses pkg_resoures during run time
    - should_be_noarch_python  # toplevel metapackage is noarch:generic
    - missing_run_exports 
  recipe-maintainers:
    - johanneskoester
    - corneliusroemer

outputs:
  - name: snakemake-minimal

    build:
      noarch: python
      script: python -m pip install --no-deps --ignore-installed .
      entry_points:
        - snakemake = snakemake:main
        - snakemake-bash-completion = snakemake:bash_completion
      run_exports:
        - {{ pin_subpackage("snakemake-minimal", max_pin="x") }}

    requirements:
      host:
        - python >=3.7
        - pip
        - setuptools
      run:
        # Keep in sync with snakemake/setup.cfg
        - python >=3.7,<3.12
        - appdirs
        - configargparse
        - connection_pool >=0.0.3
        - datrie
        - docutils
        - gitpython
        - humanfriendly
        - jinja2 >=3.0,<4.0
        - jsonschema
        - nbformat
        - packaging
        - psutil
        - pulp >=2.0
        - pyyaml
        - requests >=2.8.1
        - reretry
        - smart_open >=3.0
        - stopit
        - tabulate
        - throttler
        - toposort >=1.10
        - yte  >=1.5.1,<2.0
        - wrapt

    test:
      imports:
        - snakemake
      commands:
        - export GIT\_PYTHON_REFRESH=warn
        - snakemake --version
        - snakemake --version | grep "{{ version }}"
    
    about:
      home: https://snakemake.github.io
      license: MIT
      summary: A popular workflow management system aiming at full in-silico reproducibility.
      description: |
        Snakemake is a workflow management system that aims to reduce the complexity
        of creating workflows by providing a fast and comfortable execution 
        environment, together with a clean and modern specification language in 
        python style. Snakemake workflows are essentially Python scripts extended 
        by declarative code to define rules. Rules describe how to create output 
        files from input files. This package provides the core snakemake functionality.
        For features like reports and remote files, check out the snakemake package 
        which provides all optional dependencies.
