Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make compatible with duckdb 0.7 #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NickCrews
Copy link

In version 0.7, duckdb removed DuckDBResult, merging it with DuckDBPyConnection. Now this lib works with duckdb >=0.7

In version 0.7, duckdb removed DuckDBResult, merging it with DuckDBPyConnection. Now this lib works with duckdb >=0.7
Before, if I tried to install this package using pip I would get

`pip install .`
Obtaining file:///Users/nickcrews/Documents/projects/aioduckdb
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/Users/nickcrews/Documents/projects/aioduckdb/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/nickcrews/Documents/projects/aioduckdb/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/nickcrews/Documents/projects/aioduckdb/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 181, in prepare_metadata_for_build_editable
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/nz/wfwcn6md1796t48tx9dhf0v40000gn/T/pip-build-env-r2wy84sq/overlay/lib/python3.10/site-packages/flit_core/buildapi.py", line 49, in prepare_metadata_for_build_wheel
          metadata = make_metadata(module, ini_info)
        File "/private/var/folders/nz/wfwcn6md1796t48tx9dhf0v40000gn/T/pip-build-env-r2wy84sq/overlay/lib/python3.10/site-packages/flit_core/common.py", line 410, in make_metadata
          md_dict.update(get_info_from_module(module, ini_info.dynamic_metadata))
        File "/private/var/folders/nz/wfwcn6md1796t48tx9dhf0v40000gn/T/pip-build-env-r2wy84sq/overlay/lib/python3.10/site-packages/flit_core/common.py", line 207, in get_info_from_module
          docstring, version = get_docstring_and_version_via_import(target)
        File "/private/var/folders/nz/wfwcn6md1796t48tx9dhf0v40000gn/T/pip-build-env-r2wy84sq/overlay/lib/python3.10/site-packages/flit_core/common.py", line 180, in get_docstring_and_version_via_import
          spec.loader.exec_module(m)
        File "<frozen importlib._bootstrap_external>", line 883, in exec_module
        File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
        File "/Users/nickcrews/Documents/projects/aioduckdb/aioduckdb/__init__.py", line 6, in <module>
          from duckdb import (  # pylint: disable=redefined-builtin
      ModuleNotFoundError: No module named 'duckdb'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This is because during the wheel build process we actually need duckdb.
Now installs work with pip. I assume this
wasn;t coming up before because people were building
with flit inside a dev environment that
had duckdb?? IDK exactly. But now it works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant