{% set version = "1.24.2" %} package: name: numpy version: {{ version }} # use 'python_impl' in meta.yaml so it gets picked up by rendering # [python_impl == "pypy"] source: - url: https://github.com/numpy/numpy/releases/download/v{{ version }}/numpy-{{ version }}.tar.gz sha256: 003a9f530e880cb2cd177cba1af7220b9aa42def9c4afc2a2fc3ee6be7eb2b22 # the sources by upstream themselves (as opposed to automated by github) contain the # svml submodule (which isn't in github tarball due to dear-github/dear-github#214); # keep this for reference & debugging when necessary; for exact commit, see: # https://github.com/numpy/numpy/tree/v{{ version }}/numpy/core/src/umath # - git_url: https://github.com/numpy/SVML.git # git_rev: 1c5260a61e7dce6be48073dfa96291edb0a11d79 # folder: numpy/core/src/umath/svml build: number: 0 entry_points: - f2py = numpy.f2py.f2py2e:main # [win] run_exports: - {{ pin_subpackage("numpy") }} requirements: build: - python # [build_platform != target_platform] - cross-python_{{ target_platform }} # [build_platform != target_platform] - cython # [build_platform != target_platform] - setuptools <60.0.0 # [build_platform != target_platform] - {{ compiler('c') }} - {{ compiler('cxx') }} host: - setuptools <60.0.0 - python - pip - cython - libblas - libcblas - liblapack run: - python run_constrained: # enforce eviction of package from anaconda defaults - numpy-base <0a0 {% set tests_to_skip = "_not_a_real_test" %} # there are some tests that cannot really work in emulation, see e.g. numpy/numpy#20445 {% set tests_to_skip = tests_to_skip + " or Test_ARM_Features" %} # [build_platform != target_platform] {% set tests_to_skip = tests_to_skip + " or Test_POWER_Features" %} # [build_platform != target_platform] # test_new_policy reruns part of test suite; including a CPU feature test that fails in emulation {% set tests_to_skip = tests_to_skip + " or test_new_policy" %} # [build_platform != target_platform] test: requires: - pytest - pytest-timeout - pytest-xdist # (mostly) optional test requirements (except wheel, python-cov, mypy), see # https://github.com/numpy/numpy/blob/main/test_requirements.txt - cffi # [py<=39 and python_impl != "pypy"] - cython - hypothesis # workaround for python/cpython#98706 - importlib_metadata >=4.13 # [py==311] - pytz - setuptools <60.0.0 - typing_extensions # some linux tests need a C compiler; # extra f2py tests need a fortran compiler - {{ compiler('c') }} # [linux] - {{ compiler('fortran') }} # [linux] commands: - f2py -h # numpy.test will show SIMD features of agent (in the past, there have been # failures that occured depending on presence/absence of e.g. AVX512); # for signature of numpy.test see the following (note default: label='fast'), # https://github.com/numpy/numpy/blob/maintenance/1.22.x/numpy/_pytesttester.py#L81-L82 {% set label = "'fast'" if ((aarch64 or ppc64le) and python_impl == "pypy") else "'full'" %} {% set param = "verbose=1, label=" + label + ", tests=None" %} {% set extra = "extra_argv=['-k', 'not (" + tests_to_skip + ")', '-nauto', '--timeout=3000', '--durations=50']" %} - python -c "import numpy, sys; sys.exit(not numpy.test({{ param }}, {{ extra }}))" imports: - numpy # reference for public API is effectively # https://github.com/numpy/numpy/blame/main/numpy/tests/test_public_api.py - numpy.array_api - numpy.array_api.linalg - numpy.ctypeslib - numpy.distutils - numpy.doc - numpy.doc.constants - numpy.doc.ufuncs - numpy.f2py - numpy.fft - numpy.lib - numpy.lib.mixins - numpy.lib.recfunctions - numpy.lib.scimath - numpy.linalg - numpy.ma - numpy.ma.extras - numpy.ma.mrecords - numpy.matlib - numpy.polynomial - numpy.random - numpy.testing - numpy.typing - numpy.version # some private modules that were once upon a time # determined to be useful packaging checks - numpy.core.multiarray - numpy.core._multiarray_tests - numpy.core.numeric - numpy.core._operand_flag_tests - numpy.core._struct_ufunc_tests - numpy.core._rational_tests - numpy.core.umath - numpy.core._umath_tests - numpy.linalg.lapack_lite - numpy.random.mtrand about: home: http://numpy.org/ license: BSD-3-Clause license_file: LICENSE.txt summary: The fundamental package for scientific computing with Python. doc_url: https://numpy.org/doc/stable/ dev_url: https://github.com/numpy/numpy extra: recipe-maintainers: - jakirkham - msarahan - pelson - rgommers - ocefpaf - isuruf - xhochy - h-vetinari