Skip to content

Commit d2ef718

Browse files
committed
Fix UV build
1 parent 7ca391f commit d2ef718

File tree

10 files changed

+206
-1113
lines changed

10 files changed

+206
-1113
lines changed

.github/workflows/nightly-pypi-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
python-version: 3.12
4141

4242
- name: Install UV
43-
run: make install-uv
43+
uses: astral-sh/setup-uv@v6
4444

4545
- name: Set version
4646
id: set-version

.github/workflows/pypi-build-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
3.12
4848
4949
- name: Install UV
50-
run: make install-uv
50+
uses: astral-sh/setup-uv@v6
5151

5252
- name: Set version with RC
5353
env:

.github/workflows/python-ci-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
python-version: 3.12
4242
- name: Install UV
43-
run: make install-uv
43+
uses: astral-sh/setup-uv@v6
4444
- name: Install
4545
run: make docs-install
4646
- name: Build docs

.github/workflows/python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
python-version: ${{ matrix.python }}
5757
- name: Install UV
58-
run: make install-uv
58+
uses: astral-sh/setup-uv@v6
5959
- name: Install system dependencies
6060
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
6161
- name: Install

.github/workflows/python-release-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
python-version: ${{ matrix.python }}
3737
- name: Install UV
38-
run: make install-uv
38+
uses: astral-sh/setup-uv@v6
3939
- name: Install docs
4040
run: make docs-install
4141
- name: Build docs

.github/workflows/python-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
python-version: 3.12
9999

100100
- name: Install UV
101-
run: make install-uv
101+
uses: astral-sh/setup-uv@v6
102102

103103
- name: Validate current pyiceberg version
104104
env:

.github/workflows/svn-build-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
3.12
4848
4949
- name: Install UV
50-
run: make install-uv
50+
uses: astral-sh/setup-uv@v6
5151

5252
# Publish the source distribution with the version that's in
5353
# the repository, otherwise the tests will fail

build-module.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
allowed_to_fail = os.environ.get("CIBUILDWHEEL", "0") != "1"
2626

2727

28-
class CythonBuildHook(BuildHookInterface):
28+
class BuildHook(BuildHookInterface):
2929
def build_cython_extensions(self) -> None:
3030
import Cython.Compiler.Options
3131
from Cython.Build import build_ext, cythonize
@@ -55,7 +55,13 @@ def build_cython_extensions(self) -> None:
5555
language="c",
5656
)
5757

58-
ext_modules = cythonize([extension], include_path=list(package_path), language_level=3, annotate=True)
58+
ext_modules = cythonize(
59+
[extension],
60+
include_path=[package_path],
61+
language_level=3,
62+
annotate=True,
63+
)
64+
print("Extensions generated:", [e.name for e in ext_modules])
5965
dist = Distribution({"ext_modules": ext_modules})
6066
cmd = build_ext(dist)
6167
cmd.ensure_finalized()
@@ -70,6 +76,9 @@ def build_cython_extensions(self) -> None:
7076
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
7177
try:
7278
self.build_cython_extensions()
79+
# only set if Cython build succeeds
80+
build_data["pure_python"] = False
81+
build_data["infer_tag"] = True
7382
except Exception:
7483
if not allowed_to_fail:
7584
raise

pyproject.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ name = "pyiceberg"
1919
version = "0.10.0"
2020
description = "Apache Iceberg is an open table format for huge analytic datasets"
2121
authors = [{ name = "Apache Software Foundation", email = "[email protected]" }]
22-
requires-python = ">=3.9.2,<4.0.0,!=3.9.7"
22+
requires-python = ">=3.10.0,<4.0.0"
2323
readme = "README.md"
2424
license = "Apache-2.0"
2525
classifiers = [
2626
"License :: OSI Approved :: Apache Software License",
2727
"Operating System :: OS Independent",
28-
"Programming Language :: Python :: 3.9",
2928
"Programming Language :: Python :: 3.10",
3029
"Programming Language :: Python :: 3.11",
3130
"Programming Language :: Python :: 3.12",
@@ -36,7 +35,7 @@ dependencies = [
3635
"click>=7.1.1,<9.0.0",
3736
"rich>=10.11.0,<15.0.0",
3837
"strictyaml>=1.7.0,<2.0.0", # CVE-2020-14343 was fixed in 5.4.
39-
"pydantic>=2.0,!=2.4.0,!=2.4.1,<2.12.0", # 2.4.0, 2.4.1, 2.12.0 has a critical bug
38+
"pydantic>=2.0,<3.0,!=2.4.0,!=2.4.1,!=2.12.0,!=2.12.1", # 2.4.0, 2.4.1, 2.12.0, 2.12.1 has a critical bug
4039
"sortedcontainers==2.4.0",
4140
"fsspec>=2023.1.0",
4241
"pyparsing>=3.1.0,<4.0.0",
@@ -49,19 +48,19 @@ dependencies = [
4948
[project.optional-dependencies]
5049
pyarrow = [
5150
"pyarrow>=17.0.0",
52-
"pyiceberg-core>=0.5.1,<0.7.0",
51+
"pyiceberg-core>=0.5.1,<0.8.0",
5352
]
5453
pandas = [
54+
"pyiceberg[pyarrow]",
5555
"pandas>=1.0.0,<3.0.0",
56-
"pyarrow>=17.0.0",
5756
]
5857
duckdb = [
58+
"pyiceberg[pyarrow]",
5959
"duckdb>=0.5.0,<2.0.0",
60-
"pyarrow>=17.0.0",
6160
]
6261
ray = [
62+
"pyiceberg[pyarrow]",
6363
"ray>=2.10.0,<=2.44.0",
64-
"pyarrow>=17.0.0",
6564
"pandas>=1.0.0,<3.0.0",
6665
]
6766
bodo = ["bodo>=2025.7.4"]
@@ -104,15 +103,15 @@ dev = [
104103
"pytest-checkdocs==2.13.0",
105104
"prek>=0.2.1,<0.3",
106105
"pytest-lazy-fixture==0.6.3",
107-
"fastavro==1.12.0",
106+
"fastavro==1.12.1",
108107
"coverage[toml]>=7.4.2,<8",
109108
"requests-mock==1.12.1",
110109
"moto[server]>=5.0.2,<6",
111110
"typing-extensions==4.15.0",
112111
"pytest-mock==3.15.1",
113112
"pyspark[connect]==4.0.1",
114-
"protobuf==5.29.5", # match Spark Connect's gencode
115-
"cython==3.1.4",
113+
"protobuf==6.33.0", # match Spark Connect's gencode
114+
"cython==3.1.6",
116115
"deptry>=0.14,<0.24",
117116
"docutils!=0.21.post1",
118117
"mypy-boto3-glue>=1.28.18",
@@ -128,7 +127,7 @@ docs = [
128127
"mkdocs-literate-nav==0.6.2",
129128
"mkdocs-autorefs==1.4.3",
130129
"mkdocs-gen-files==0.5.0",
131-
"mkdocs-material==9.6.21",
130+
"mkdocs-material==9.6.22",
132131
"mkdocs-material-extensions==1.3.1",
133132
"mkdocs-section-index==0.3.10",
134133
]
@@ -140,6 +139,7 @@ default-groups = [
140139
]
141140

142141
[tool.hatch.build.targets.sdist]
142+
pure-python = false
143143
include = [
144144
"pyiceberg",
145145
"vendor/fb303",

0 commit comments

Comments
 (0)