@@ -295,13 +295,38 @@ ignore_missing_imports = true
295295pyiceberg = " pyiceberg.cli.console:run"
296296
297297[build-system ]
298- requires = [" poetry-core>=1.0.0" , " wheel" , " Cython>=3.0.0" , " setuptools" ]
298+ requires = [" poetry-core>=1.0.0" , " wheel" , " Cython>=3.0.0" , " setuptools" , " setuptools-scm>=8.0 " ]
299299build-backend = " poetry.core.masonry.api"
300300
301301[tool .poetry .build ]
302302generate-setup-file = false
303303script = " build-module.py"
304304
305+ [tool .setuptools_scm ]
306+ write_to = " pyiceberg/_version.py"
307+ write_to_template = """ # Licensed to the Apache Software Foundation (ASF) under one
308+ # or more contributor license agreements. See the NOTICE file
309+ # distributed with this work for additional information
310+ # regarding copyright ownership. The ASF licenses this file
311+ # to you under the Apache License, Version 2.0 (the
312+ # "License"); you may not use this file except in compliance
313+ # with the License. You may obtain a copy of the License at
314+ #
315+ # http://www.apache.org/licenses/LICENSE-2.0
316+ #
317+ # Unless required by applicable law or agreed to in writing,
318+ # software distributed under the License is distributed on an
319+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
320+ # KIND, either express or implied. See the License for the
321+ # specific language governing permissions and limitations
322+ # under the License.
323+ # Generated by setuptools_scm
324+
325+ __version__ = "{version}"
326+ __version_tuple__ = {version_tuple}
327+ """
328+ git_describe_command = " git describe --dirty --tags --long --match '*[0-9]*'"
329+
305330[tool .poetry .extras ]
306331pyarrow = [" pyarrow" , " pyiceberg-core" ]
307332pandas = [" pandas" , " pyarrow" ]
@@ -535,5 +560,9 @@ ignore_missing_imports = true
535560module = " pyroaring.*"
536561ignore_missing_imports = true
537562
563+ [[tool .mypy .overrides ]]
564+ module = " pyiceberg._version"
565+ ignore_missing_imports = true
566+
538567[tool .coverage .run ]
539568source = [' pyiceberg/' ]
0 commit comments