HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/pkgs/httpx-0.27.0-py312haa95532_0/info/recipe/meta.yaml.template
{% set name = "httpx" %}
{% set version = "0.27.0" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5
  patches:
    - patches/0001-remove-fancy-pypi-readme.patch

build:
  number: 0
  script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
  # no httpcore>=1 for s390x
  skip: True  # [py<38 or s390x]
  entry_points:
    - httpx = httpx:main

requirements:
  build:
    - patch     # [unix]
    - m2-patch  # [win]
  host:
    - pip
    - python
    - hatchling
  run:
    - python
    - certifi
    - httpcore >=1.0.0,<2.0.0a0
    - anyio
    - idna
    - sniffio
  run_constrained:
    - click >=8.0.0,<9.0.0a0
    - pygment >=2.0.0,<3.0.0a0
    - rich >=10.0.0,<14.0.0a0
    - h2 >=3.0.0,<5.0.0a0
    - socksio >=1.0.0,<2.0.0a0

{% set tests_to_skip = "" %}
# skip tests using socksio, optional dependency, not available for all platforms
{% set tests_to_skip = tests_to_skip + " test_socks_proxy_deprecated" %}               
{% set tests_to_skip = tests_to_skip + " or test_socks_proxy" %}
# skip some tests for Windows
#
# no TypeError raised
{% set tests_to_skip = tests_to_skip + " or test_multipart_encode_files_raises_exception_with_text_mode_file" %}  # [win]
# these two fail on assert response.elapsed > timedelta(seconds=0)
{% set tests_to_skip = tests_to_skip + " or test_write_timeout[asyncio]" %}            # [win]
{% set tests_to_skip = tests_to_skip + " or test_get[asyncio]" %}                      # [win]
# paths with "\\\\" instead of "\\"
{% set tests_to_skip = tests_to_skip + " or test_logging_ssl" %}                       # [win]
# again paths: "tests\\test_utils.py" != "tests/test_utils.py"
{% set tests_to_skip = tests_to_skip + " or test_get_ssl_cert_file" %}                 # [win]

test:
  source_files:
    - tests
  imports:
    - httpx
  requires:
    - pip
    - pytest
    # You want brotli-python here rather than just the brotli that
    # "import brotli" might imply
    - brotli-python
    - chardet
    - trio
    - trustme
    - uvicorn
    - h2
    # [cli testing] - pygment unavailable but optional
    - click
    # - pygment
    - rich
  commands:
    - pip check
    # Running the command "httpx --help" from a Windows terminal works.
    # PYTHONIOENCODING=utf8
    # Solves 
    #    "UnicodeEncodeError: 'charmap' codec can't encode character"
    # during tests.
    - set PYTHONIOENCODING=utf8  # [win]
    - httpx --help
    - pytest -vv tests -k "not ({{ tests_to_skip }})"

about:
  home: https://github.com/encode/httpx
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE.md
  summary: A next-generation HTTP client for Python.
  description: |
    HTTPX is a fully featured HTTP client library for Python 3.
    It includes an integrated command line client, has support
    for both HTTP/1.1 and HTTP/2, and provides both sync and async APIs.
  doc_url: https://www.python-httpx.org
  dev_url: https://github.com/encode/httpx

extra:
  recipe-maintainers:
    - primozgodec
    - florimondmanca
    - thewchan