{% set name = "pandas" %}
{% set version = "2.1.1" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/pandas-{{ version }}.tar.gz
  sha256: fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b

build:
  number: 0
  entry_points:
    - matplotlib = pandas:plotting._matplotlib
  skip: true  # [py<39]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - python
    - python-build
    - meson-python ==0.13.1
    - meson ==1.2.1
    - cython >=0.29.33,<3
    - numpy {{ numpy }}
    - versioneer
    - tomli # [py<311]
    - pip
  run:
    - python
    # Base Dependencies
    - {{ pin_compatible('numpy') }}
    - python-dateutil >=2.8.2
    - pytz >=2020.1
    - python-tzdata >=2022.1
    # Recommended dependencies to achieve large speedups
    # see https://pandas.pydata.org/pandas-docs/version/2.1.1/getting_started/install.html#performance-dependencies-recommended
    - numexpr >=2.8.0
    - bottleneck >=1.3.4
  run_constrained:
    # Optional dependencies
    # see https://pandas.pydata.org/pandas-docs/version/2.1.1/getting_started/install.html#optional-dependencies
    # and https://github.com/pandas-dev/pandas/blob/v2.1.1/pyproject.toml
    # performance
    - numba >=0.55.2
    # plot
    - matplotlib-base >=3.6.1
    # output_formatting
    - jinja2 >=3.1.2
    - tabulate >=0.8.10
    # computation
    - scipy >=1.8.1
    - xarray >=2022.03.0
    # fss
    - fsspec >=2022.05.0
    # aws
    - s3fs >=2022.05.0
    # gcp
    - gcsfs >=2022.05.0
    - pandas-gbq >=0.17.5
    # excel
    - odfpy>=1.4.1
    - openpyxl >=3.0.10
    - pyxlsb >=1.0.9
    - xlrd >=2.0.1
    - xlsxwriter >=3.0.3
    # parquet, feather
    - pyarrow >=7.0.0
    # hdf5
    - blosc >=1.21.0
    - pytables >=3.7.0
    # spss
    - pyreadstat >=1.1.5
    # DB
    - sqlalchemy >=1.4.36
    - psycopg2 >=2.9.3
    - pymysql >=1.0.2
    # html, xml
    - beautifulsoup4 >=4.11.1
    - html5lib >=1.1
    - lxml >=4.8.0
    # compression
    - zstandard >=0.17.0
    # clipboard
    - pyqt >=5.15.6,<6
    - qtpy >=2.2.0
    # consortium-standard
    - dataframe-api-compat >=0.1.7
    # uncategorized
    - fastparquet >=0.8.1
test:
  requires:
    - pip
    - pytest >=7.3.2
    - pytest-asyncio >=0.17.0
    - pytest-xdist >=2.2.0
    - hypothesis >=6.46.1
  commands:
    - pip check
    {% set config_path = "{{ SRC_DIR }}/pyproject.toml" %}
    {% set markers = ["not clipboard", "not single_cpu", "not slow", "not network", "not db"] %}
    {% set markers = markers + ["not arm_slow"] %}   # [aarch64 or ppc64le]
    {% set extra_args = ["-m " + " and ".join(markers)] %}
    {% set extra_args = extra_args + ["-n=2"] %}
    {% set tests_to_skip = "_not_a_real_test" %}
    {% set tests_to_skip = tests_to_skip + " or test_can_set_locale_valid_set" %}                 # [osx]
    # skiptest_rolling_var_numerical_issues 
    # xref: https://github.com/conda-forge/pandas-feedstock/issues/149
    {% set tests_to_skip = tests_to_skip + " or test_rolling_var_numerical_issues" %}             # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestFromArrays and test_constructor)" %}         # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestFromBreaks and test_constructor)" %}         # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestFromTuples and test_constructor)" %}         # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestClassConstructors and test_constructor)" %}  # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestStata and test_writer_117)" %}               # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestStata and test_convert_strl_name_swap)" %}   # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestStata and test_strl_latin1)" %}              # [s390x]
    {% set tests_to_skip = tests_to_skip + " or (TestStata and test_utf8_writer)" %}              # [s390x]
    # skip test_floordiv_axis0_numexpr_path[python-pow] 
    # xref: https://github.com/pandas-dev/pandas/issues/54546
    {% set tests_to_skip = tests_to_skip + " or test_floordiv_axis0_numexpr_path[python-pow]" %}
    # skip windows tests which call _tz_localize_using_tzinfo_api - fails on CI but not when run on dev instance
    # OSError may be thrown by tzlocal on windows at or close to 1970-01-01
    #  see https://github.com/pandas-dev/pandas/pull/37591#issuecomment-720628241
    {% set tests_to_skip = tests_to_skip + " or TestDatetime64ArrayLikeComparisons or test_apply_out_of_range or TestNonNano" %} # [win]
    {% set extra_args = extra_args + ["-k", "not (" + tests_to_skip + ")", "--no-strict-data-files"] %}
    # use --no-strict-data-files 
    # xref: https://github.com/pandas-dev/pandas/issues/54907
    - python -c "import pandas; pandas.test(extra_args={{ extra_args }})"

about:
  home: https://pandas.pydata.org
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE
  summary: High-performance, easy-to-use data structures and data analysis tools.
  description: |
    pandas is a Python package that provides fast, flexible, and expressive data structures
    designed to make working with "relational" or "labeled" data both easy and intuitive.
    It aims to be the fundamental high-level building block for doing practical, real world
    data analysis in Python. Additionally, it has the broader goal of becoming the most
    powerful and flexible open source data analysis / manipulation tool available in any
    language. It is already well on its way towards this goal.
  dev_url: https://github.com/pandas-dev/pandas
  doc_url: https://pandas.pydata.org/pandas-docs/version/{{ version }}/index.html

extra:
  skip-lints:
    - has_run_test_and_commands
  recipe-maintainers:
    - jreback
    - jorisvandenbossche
    - msarahan
    - ocefpaf
    - TomAugspurger
    - WillAyd
    - simonjayhawkins
    - ryanskeith
