{% set version = "0.18.0" %}

package:
  name: cartopy
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/C/Cartopy/Cartopy-{{ version }}.tar.gz
  sha256: 7ffa317e8f8011e0d965a3ef1179e57a049f77019867ed677d49dcc5c0744434

build:
  skip: True  # [win and vc<14]
  error_overlinking: true
  number: 1

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - python
    - pip
    - cython
    - numpy
    - msinttypes  # [win and vc<14]
    # proj and geos are needed as dependencies even though not listed upstream
    - proj <8.0.0  # newer versions removed required proj_api.h
    - geos
  run:
    - python
    - {{ pin_compatible('numpy') }}
    - shapely >=1.5.6
    - pyshp >=1.1.4
    - six >=1.3.0
    # proj and geos are needed as dependencies even though not listed upstream
    - proj <8.0.0  # newer versions removed required proj_api.h
    - geos
    # including matplotlib-base even though it's optional upstream
    - matplotlib-base >=1.5.1
    - scipy >=0.10

test:
  imports:
    - cartopy
    - cartopy.mpl.geoaxes
    - cartopy.crs
  commands:
    - python -c "import cartopy.crs as ccrs; import matplotlib.pyplot as plt; ax = plt.axes(projection=ccrs.PlateCarree())"

about:
  home: http://scitools.org.uk/cartopy
  license: LGPL-3
  license_file:
    - COPYING
    - COPYING.LESSER
  summary: A library providing cartographic tools for python
  dev_url: https://github.com/SciTools/cartopy
  doc_url: https://scitools.org.uk/cartopy/docs/latest/

extra:
  recipe-maintainers:
    - marqh
    - ocefpaf
    - pelson
    - dopplershift
    - xylar
