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

build(python): fix python pkg version #10049

Merged
merged 7 commits into from
Dec 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update python README.md to remove direct setup.py invocation
  • Loading branch information
Mause committed Dec 20, 2023
commit f27e90e1d97c6d053b6864e677bb1b94caead4dd
11 changes: 6 additions & 5 deletions tools/pythonpkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Note that this will override any existing DuckDB installation you might have. Yo
source .venv/bin/activate
BUILD_PYTHON=1 make

You can also directly invoke the setup.py script from the `tools/pythonpkg` environment.
You can also directly invoke pip from the `tools/pythonpkg` environment.

cd tools/pythonpkg
python3 setup.py install
python3 -m pip install .

Alternatively, using virtualenv and pip:

Expand All @@ -49,9 +49,10 @@ storage from a notebook.

First, get the repository based version number and extract the source distribution.

python3 -m pip install build # required for pep517 compliant source dists
cd tools/pythonpkg
export SETUPTOOLS_SCM_PRETEND_VERSION=$(python setup.py --version)
python setup.py sdist
export SETUPTOOLS_SCM_PRETEND_VERSION=$(python3 -m setuptools_scm)
pyproject-build . --sdist
cd ../..

Next, copy over the python package related files, and install the package.
Expand Down Expand Up @@ -108,7 +109,7 @@ All the above should be done in a virtualenv.

## Clang-tidy and CMakeLists

The pythonpkg does not use the CMakeLists for compilation, for that it uses `setup.py` and `package_build.py` mostly.
The pythonpkg does not use the CMakeLists for compilation, for that it uses pip and `package_build.py` mostly.
But we still have CMakeLists in the pythonpkg, for tidy-check and intellisense purposes.
For this reason it might not be instantly apparent that the CMakeLists are incorrectly set up, and will only result in a very confusing CI failure of TidyCheck.

Expand Down