diff --git a/.rules.md b/.rules.md index 7f15c3e2..047895db 100644 --- a/.rules.md +++ b/.rules.md @@ -4,7 +4,7 @@ This file provides guidance to programming agents when working with code in this ## Project Overview -The Apify SDK for Python (`apify` package on PyPI) is the official library for creating [Apify Actors](https://docs.apify.com/platform/actors) in Python. It provides Actor lifecycle management, storage access (datasets, key-value stores, request queues), event handling, proxy configuration, and pay-per-event charging. It builds on top of the [Crawlee](https://crawlee.dev/python) web scraping framework and the [Apify API Client](https://docs.apify.com/api/client/python). Supports Python 3.11–3.14. Build system: hatchling. +The Apify SDK for Python (`apify` package on PyPI) is the official library for creating [Apify Actors](https://docs.apify.com/platform/actors) in Python. It provides Actor lifecycle management, storage access (datasets, key-value stores, request queues), event handling, proxy configuration, and pay-per-event charging. It builds on top of the [Crawlee](https://crawlee.dev/python) web scraping framework and the [Apify API Client](https://docs.apify.com/api/client/python). Supports Python 3.11–3.14. Build system: uv_build. ## Common Commands diff --git a/docs/03_guides/code/uv_project/Dockerfile b/docs/03_guides/code/uv_project/Dockerfile index 24e7a44b..77a247e9 100644 --- a/docs/03_guides/code/uv_project/Dockerfile +++ b/docs/03_guides/code/uv_project/Dockerfile @@ -4,8 +4,8 @@ # You can also use any other image from Docker Hub. FROM apify/actor-python:3.14 -# Add the uv binary from its official distroless image (pinned to the 0.11.x line). -COPY --from=ghcr.io/astral-sh/uv:0.11 /uv /uvx /bin/ +# Add the uv binary from its official distroless image (pinned to the 0.12.x line). +COPY --from=ghcr.io/astral-sh/uv:0.12 /uv /uvx /bin/ # Configure uv for container builds: # - compile installed packages to bytecode, so the Actor starts faster, diff --git a/pyproject.toml b/pyproject.toml index 607778bd..3e49e538 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,20 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build"] +build-backend = "uv_build" [project] name = "apify" version = "4.0.0" description = "Apify SDK for Python" authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }] -license = { file = "LICENSE" } +license = "Apache-2.0" +license-files = ["LICENSE"] readme = "README.md" requires-python = ">=3.11" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -88,21 +88,9 @@ dev = [ "werkzeug<4.0.0", # Werkzeug is used by httpserver ] -[tool.hatch.build.targets.wheel] -packages = ["src/apify"] - -[tool.hatch.build.targets.sdist] -only-include = [ - "src/apify", - "CHANGELOG.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "pyproject.toml", -] - -[tool.hatch.metadata] -allow-direct-references = true +[tool.uv.build-backend] +# The module, pyproject.toml, README, and LICENSE are included in the sdist by default. +source-include = ["CHANGELOG.md", "CONTRIBUTING.md"] [tool.ruff] line-length = 120 diff --git a/website/versioned_docs/version-4.0/03_guides/code/uv_project/Dockerfile b/website/versioned_docs/version-4.0/03_guides/code/uv_project/Dockerfile index 24e7a44b..77a247e9 100644 --- a/website/versioned_docs/version-4.0/03_guides/code/uv_project/Dockerfile +++ b/website/versioned_docs/version-4.0/03_guides/code/uv_project/Dockerfile @@ -4,8 +4,8 @@ # You can also use any other image from Docker Hub. FROM apify/actor-python:3.14 -# Add the uv binary from its official distroless image (pinned to the 0.11.x line). -COPY --from=ghcr.io/astral-sh/uv:0.11 /uv /uvx /bin/ +# Add the uv binary from its official distroless image (pinned to the 0.12.x line). +COPY --from=ghcr.io/astral-sh/uv:0.12 /uv /uvx /bin/ # Configure uv for container builds: # - compile installed packages to bytecode, so the Actor starts faster,