Skip to content

Commit 87f7f1a

Browse files
authored
Add uv instructions to bindings/python/README.md (#1514)
While building from a fresh setup, I noticed that uv is a requirement: ``` python3 -m hatch build ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/hatch/cli/__init__.py:221 in │ │ main │ │ │ │ 218 │ │ 219 def main(): # no cov │ │ 220 │ try: │ │ ❱ 221 │ │ hatch(prog_name='hatch', windows_expand_args=False) │ │ 222 │ except Exception: # noqa: BLE001 │ │ 223 │ │ import sys │ │ 224 │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/click/core.py:1161 in │ │ __call__ │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/click/core.py:1082 in main │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/click/core.py:1697 in invoke │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/click/core.py:1443 in invoke │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/click/core.py:788 in invoke │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/click/decorators.py:45 in │ │ new_func │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/hatch/cli/build/__init__.py: │ │ 72 in build │ │ │ │ 69 │ │ targets = ('sdist', 'wheel') │ │ 70 │ │ │ 71 │ if app.project.metadata.build.build_backend != 'hatchling.build': │ │ ❱ 72 │ │ for context in app.runner_context(['hatch-build']): │ │ 73 │ │ │ context.add_shell_command( │ │ 74 │ │ │ │ 'build-sdist' if targets == ('sdist',) else 'build-wheel' if targets == │ │ 75 │ │ │ ) │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/hatch/cli/application.py:224 │ │ in runner_context │ │ │ │ 221 │ │ │ │ context = ExecutionContext(environment) │ │ 222 │ │ │ │ yield context │ │ 223 │ │ │ │ │ │ ❱ 224 │ │ │ │ self.prepare_environment(environment) │ │ 225 │ │ │ │ with EnvVars(context.env_vars): │ │ 226 │ │ │ │ │ self.run_shell_commands(context) │ │ 227 │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/hatch/cli/application.py:111 │ │ in prepare_environment │ │ │ │ 108 │ │ │ self.env_metadata.reset(environment) │ │ 109 │ │ │ │ │ 110 │ │ │ with environment.app_status_creation(): │ │ ❱ 111 │ │ │ │ environment.create() │ │ 112 │ │ │ │ │ 113 │ │ │ if not environment.skip_install: │ │ 114 │ │ │ │ if environment.pre_install_commands: │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/hatch/env/virtual.py:157 in │ │ create │ │ │ │ 154 """ │ │ 155 │ │ │ │ ) │ │ 156 │ │ │ │ ❱ 157 │ │ with self.expose_uv(): │ │ 158 │ │ │ self.virtual_env.create(self.parent_python, allow_system_packages=self.confi │ │ 159 │ │ │ 160 │ def remove(self): │ │ │ │ /Users/fokko.driesprong/Library/Python/3.9/lib/python/site-packages/hatch/utils/structures.py:38 │ │ in __enter__ │ │ │ │ 35 │ │ │ 36 │ def __enter__(self) -> None: │ │ 37 │ │ os.environ.clear() │ │ ❱ 38 │ │ os.environ.update(self) │ │ 39 │ │ │ 40 │ def __exit__( │ │ 41 │ │ self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tra │ │ │ │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python │ │ 3.9/_collections_abc.py:942 in update │ │ │ │ 939 │ │ ''' │ │ 940 │ │ if isinstance(other, Mapping): │ │ 941 │ │ │ for key in other: │ │ ❱ 942 │ │ │ │ self[key] = other[key] │ │ 943 │ │ elif hasattr(other, "keys"): │ │ 944 │ │ │ for key in other.keys(): │ │ 945 │ │ │ │ self[key] = other[key] │ │ │ │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python │ │ 3.9/os.py:684 in __setitem__ │ │ │ │ 681 │ │ │ 682 │ def __setitem__(self, key, value): │ │ 683 │ │ key = self.encodekey(key) │ │ ❱ 684 │ │ value = self.encodevalue(value) │ │ 685 │ │ putenv(key, value) │ │ 686 │ │ self._data[key] = value │ │ 687 │ │ │ │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python │ │ 3.9/os.py:756 in encode │ │ │ │ 753 │ │ encoding = sys.getfilesystemencoding() │ │ 754 │ │ def encode(value): │ │ 755 │ │ │ if not isinstance(value, str): │ │ ❱ 756 │ │ │ │ raise TypeError("str expected, not %s" % type(value).__name__) │ │ 757 │ │ │ return value.encode(encoding, 'surrogateescape') │ │ 758 │ │ def decode(value): │ │ 759 │ │ │ return value.decode(encoding, 'surrogateescape') │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ TypeError: str expected, not NoneType ```
1 parent 9277a17 commit 87f7f1a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bindings/python/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919

2020
# Pyiceberg Core
2121

22-
This project is used to build an iceberg-rust powered core for pyiceberg.
22+
This project is used to build an Iceberg-rust powered core for [PyIceberg](https://py.iceberg.apache.org/).
2323

2424
## Setup
2525

26+
Install Hatch:
27+
2628
```shell
2729
pip install hatch==1.12.0
2830
```
2931

32+
Hatch uses [uv](https://docs.astral.sh/uv/) as a backend by default, so [make sure that it is installed](https://docs.astral.sh/uv/getting-started/installation/) as well.
33+
3034
## Build
3135

3236
```shell
@@ -37,4 +41,4 @@ hatch run dev:develop
3741

3842
```shell
3943
hatch run dev:test
40-
```
44+
```

0 commit comments

Comments
 (0)