Package Details: python-duckdb 1.2.1-1

Git Clone URL: https://aur.archlinux.org/duckdb.git (read-only, click to copy)
Package Base: duckdb
Description: An in-process SQL OLAP database management system (Python API)
Upstream URL: https://duckdb.org
Licenses: MIT
Conflicts: python-duckdb-git
Submitter: grawlinson
Maintainer: AlphaJack
Last Packager: AlphaJack
Votes: 8
Popularity: 1.52
First Submitted: 2021-10-30 06:37 (UTC)
Last Updated: 2025-03-13 22:11 (UTC)

Latest Comments

1 2 Next › Last »

darose commented on 2025-03-14 00:47 (UTC)

Below issue is probably related to these messages I see when I build:

-- Found Git: /usr/bin/git (found version "2.48.1")
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Warning at CMakeLists.txt:309 (message):
  git is available (at /usr/bin/git) but has failed to execute 'log -1
  --format=%h'.  Consider providing explicit GIT_COMMIT_HASH or
  OVERRIDE_GIT_DESCRIBE


fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Warning at CMakeLists.txt:320 (message):
  git is available (at /usr/bin/git) but has failed to execute 'describe
  --tags --long', likely due to shallow clone.  Consider providing explicit
  OVERRIDE_GIT_DESCRIBE or clone with tags.  Continuing with dummy version
  v0.0.1


-- git hash 0123456789, version v0.0.1, extension folder v0.0.1
-- Extensions will be deployed to: /var/abs/local/duckdb/src/build/repository
-- Load extension 'core_functions' from '/var/abs/local/duckdb/src/duckdb-1.2.1/extensions' @ v0.0.1
-- Load extension 'parquet' from '/var/abs/local/duckdb/src/duckdb-1.2.1/extensions' @ v0.0.1

darose commented on 2025-03-14 00:38 (UTC)

FYI, I ran into some issues with this package. Although I was able to finally get it to build (by overriding the env variable mentioned below) it somehow built with a version number of "v0.0.1 0123456789". This prevented the app from being able to download extensions, as it was getting a 403 when it attempted to download from the extensions web site. I didn't know how to correct this, and wound up having to install the duckdb-bin package instead. I'd rather install this one though, as I need to install python-duckdb as well, and this package takes care of 2 birds with one stone. If you know how to fix this versioning issue, please advise.

darose commented on 2025-02-11 23:02 (UTC) (edited on 2025-02-11 23:05 (UTC) by darose)

I'm running into a build error:

...
[100%] Linking CXX static library libimdb.a
[100%] Built target imdb
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
/usr/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
Traceback (most recent call last):
  File "/var/abs/local/duckdb/src/duckdb-1.2.0/tools/pythonpkg/setup.py", line 379, in <module>
    setup(
    ~~~~~^
        name=lib_name,
        ^^^^^^^^^^^^^^
    ...<25 lines>...
        },
        ^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 145, in setup
    _setup_distribution = dist = klass(attrs)
                                 ~~~~~^^^^^^^
  File "/usr/lib/python3.13/site-packages/setuptools/dist.py", line 322, in __init__
    _Distribution.__init__(self, dist_attrs)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 279, in __init__
    self.finalize_options()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/setuptools/dist.py", line 674, in finalize_options
    ep(self)
    ~~^^^^^^
  File "/usr/lib/python3.13/site-packages/setuptools_scm/_integration/setuptools.py", line 123, in infer_version
    _assign_version(dist, config)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
    _version_missing(config)
    ~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/site-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
    raise LookupError(
    ...<8 lines>...
    )
LookupError: setuptools-scm was unable to detect version for /var/abs/local/duckdb/src/duckdb-1.2.0.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
==> ERROR: A failure occurred in build().
    Aborting...

Any idea what the issue might be?

reed1 commented on 2024-09-17 14:47 (UTC)

@seschwar, add

SETUPTOOLS_SCM_PRETEND_VERSION=1.1.0

below pkgver or pkgrel

seschwar commented on 2024-06-25 12:21 (UTC)

The package doesn't build:

(...)
[100%] Built target unittest
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
Traceback (most recent call last):
  File "/home/seschwar/.cache/pacman/build/duckdb/src/duckdb-1.0.0/tools/pythonpkg/setup.py", line 386, in <module>
    setup(
  File "/usr/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 147, in setup
    _setup_distribution = dist = klass(attrs)
                                 ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 303, in __init__
    _Distribution.__init__(self, dist_attrs)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
    self.finalize_options()
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 654, in finalize_options
    ep(self)
  File "/usr/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py", line 123, in infer_version
    _assign_version(dist, config)
  File "/usr/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
    _version_missing(config)
  File "/usr/lib/python3.12/site-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/seschwar/.cache/pacman/build/duckdb/src/duckdb-1.0.0.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
(...)

Why does this PKGBUILD try to use GitHub tarballs when the software clearly tells you to not do so?

akhenakh commented on 2024-02-19 15:55 (UTC) (edited on 2024-02-19 16:42 (UTC) by akhenakh)

Same issue with 0.10.0, even after downgrading python-setuptools-scm

I made it compile using SETUPTOOLS_SCM_PRETEND_VERSION

build() {
  cmake --build build

  SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" python "$pkgbase-$pkgver/tools/pythonpkg/setup.py" build
}

full diff

diff --git a/PKGBUILD b/PKGBUILD
index ba1a892..081b477 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -42,12 +42,12 @@ prepare() {
 build() {
   cmake --build build

-  python "$pkgbase-$pkgver/tools/pythonpkg/setup.py" build
+  SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" python "$pkgbase-$pkgver/tools/pythonpkg/setup.py" build
 }

 package_duckdb() {
   conflicts=("duckdb-git")
-  DESTDIR="$pkgdir" cmake --install build
+  SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" DESTDIR="$pkgdir" cmake --install build

   # sqlite wrapper
   install -vDm755 -t "$pkgdir/usr/lib" build/tools/sqlite3_api_wrapper/libsqlite3_api_wrapper.so
@@ -69,7 +69,7 @@ package_python-duckdb() {
   conflicts=("python-duckdb-git")

   # library
-  python "$pkgbase-$pkgver/tools/pythonpkg/setup.py" install --root="$pkgdir" --optimize=1 --skip-build
+  SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" python "$pkgbase-$pkgver/tools/pythonpkg/setup.py" install --root="$pkgdir" --optimize=1 --skip-build

   # license
   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$pkgbase-$pkgver/LICENSE"

nixit commented on 2024-02-11 04:24 (UTC)

@fourier, after downgrading like you suggest, I get this error when trying to install python-duckdb

File "/home/nixit/.cache/yay/duckdb/src/duckdb-0.9.2/tools/pythonpkg/.eggs/setuptools_scm-6.4.2-py3.11.egg/setuptools_scm/init.py", line 106, in _version_missing raise LookupError( LookupError: setuptools-scm was unable to detect version for /home/nixit/.cache/yay/duckdb/src/duckdb-0.9.2.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj ==> ERROR: A failure occurred in build(). Aborting...

any suggestions?

fourier commented on 2023-12-21 02:03 (UTC)

As explained here, the problem is with setuptools_scm version 8. Downgrading to version 7.1.0.4 with

sudo pacman -U https://archive.archlinux.org/packages/p/python-setuptools-scm/python-setuptools-scm-7.1.0-4-any.pkg.tar.zst

solves the problem

fourier commented on 2023-12-21 00:29 (UTC)

@skogsmaskin I reinstalled python-setuptools-scm and I'm still getting the same error...

skogsmaskin commented on 2023-12-17 10:56 (UTC) (edited on 2023-12-17 11:54 (UTC) by skogsmaskin)

I removed (reinstalled) python-setuptools-scm before upgrading this package to get rid of the error mentioned by @fourier:

AttributeError: module 'setuptools_scm.integration' has no attribute 'infer_version'