{% set version = "0.14.0" %}

package:
  name: cachecontrol-split
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/C/CacheControl/cachecontrol-{{ version }}.tar.gz
  sha256: 7db1195b41c81f8274a7bbd97c956f44e8348265a1bc7641c37dfebc39f0c938

build:
  number: 0
  noarch: python

requirements:
  host:
    - python >=3.7
  run:
    - python >=3.7

outputs:
  - name: cachecontrol
    build:
      noarch: python
      script: {{ PYTHON }} -m pip install . -vv --no-deps
      entry_points:
        - doesitcache = cachecontrol._cmd:main
    requirements:
      host:
        - python >=3.7
        - pip
      run:
        - python >=3.7
        - requests >=2.16.0
        - msgpack-python >=0.5.2
    test: &test
      requires:
        - pip
      imports:
        - cachecontrol
      commands:
        - pip check
        - doesitcache --help

  - name: cachecontrol-with-redis
    build:
      noarch: python
    requirements:
      host:
        - python >=3.7
      run:
        - {{ pin_subpackage("cachecontrol", exact=True) }}
        - python >=3.7
        - redis-py >=2.10.5
    test: *test

  - name: cachecontrol-with-filecache
    build:
      noarch: python
    requirements:
      host:
        - python >=3.7
      run:
        - {{ pin_subpackage("cachecontrol", exact=True) }}
        - filelock >=3.8.0
        - python >=3.7
    test: *test

about:
  home: https://github.com/ionrock/cachecontrol
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE.txt
  summary: The httplib2 caching algorithms packaged up for use with requests
  description: |
    CacheControl is a port of the caching algorithms in httplib2 for use with
    requests session object.
    It was written because httplib2's better support for caching is often
    mitigated by its lack of threadsafety. The same is true of requests
    in terms of caching.
  doc_url: http://cachecontrol.readthedocs.io/
  dev_url: https://github.com/ionrock/cachecontrol

extra:
  feedstock-name: cachecontrol
  recipe-maintainers:
    - djsutherland
    - ocefpaf
