Package Details: python-duckdb 1.1.2-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: 5
Popularity: 0.004963
First Submitted: 2021-10-30 06:37 (UTC)
Last Updated: 2024-11-02 14:45 (UTC)

Latest Comments

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'

fourier commented on 2023-11-27 00:16 (UTC)

Apart from that it is failing

[100%] Building CXX object third_party/imdb/CMakeFiles/imdb.dir/imdb.cpp.o
[100%] Linking CXX static library libimdb.a
[100%] Built target imdb
/usr/lib/python3.11/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/usr/lib/python3.11/site-packages/setuptools/installer.py:44: UserWarning: Module setuptools_scm was already imported from /usr/lib/python3.11/site-packages/setuptools_scm/__init__.py, but /home/miguel/.cache/yay/duckdb/src/duckdb/tools/pythonpkg/.eggs/setuptools_scm-6.4.2-py3.11.egg is being added to sys.path
  pkg_resources.working_set.add(dist, replace=True)
Traceback (most recent call last):
  File "/home/miguel/.cache/yay/duckdb/src/duckdb/tools/pythonpkg/setup.py", line 339, in <module>
    setup(
  File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 147, in setup
    _setup_distribution = dist = klass(attrs)
                                 ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 486, in __init__
    _Distribution.__init__(
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
    self.finalize_options()
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 924, in finalize_options
    for ep in sorted(loaded, key=by_order):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 923, in <lambda>
    loaded = map(lambda e: e.load(), filtered)
                           ^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 204, in load
    return functools.reduce(getattr, attrs, module)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'setuptools_scm.integration' has no attribute 'infer_version'
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: duckdb-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-duckdb - exit status 4
⏎

fourier commented on 2023-11-26 23:42 (UTC)

This has an extremely long compilation process, isn't it possible to provide a binary? Thanks