Skip to content

Remove bundled Python packages#982

Closed
tuhaihe wants to merge 1 commit intoapache:mainfrom
tuhaihe:remove-bundles-pyfiles
Closed

Remove bundled Python packages#982
tuhaihe wants to merge 1 commit intoapache:mainfrom
tuhaihe:remove-bundles-pyfiles

Conversation

@tuhaihe
Copy link
Copy Markdown
Member

@tuhaihe tuhaihe commented Mar 7, 2025

This change removes the unnecessary bundled Python packages for a clear
codebase and better ASF license compliance.

Changes made:

  • Removed the pythonSrc and pythonSrc/ext directories from the
    source code.
  • Updated the Makefile, configure and other related files to remove
    the pythonsrc_ext related references.

Instead building the Python packages like psutil, pygresql and pyyaml
via the source code when running the Cloudberry Demo cluster, we can
install them via the command under the top dir:

pip3 install -r requirements.txt

See #961

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@tuhaihe
Copy link
Copy Markdown
Member Author

tuhaihe commented Mar 7, 2025

After deleting these files, I tested and found that we need to install the related Python dependencies after successfully building Cloudberry, so we can make all the tests pass:

pip3 install -r python-dependencies.txt

I'm still exploring how to install them in the workflow files. I would appreciate your help.

@tuhaihe tuhaihe force-pushed the remove-bundles-pyfiles branch from 315d1d2 to be81427 Compare March 7, 2025 10:35
@tuhaihe tuhaihe force-pushed the remove-bundles-pyfiles branch from 1da8b7e to e4874fc Compare March 24, 2025 07:33
@tuhaihe tuhaihe force-pushed the remove-bundles-pyfiles branch 2 times, most recently from c364f1d to e330ea1 Compare April 7, 2025 09:25
This change removes the unnecessary bundled Python packages for a clear
codebase and better ASF license compliance.

Changes made:
- Removed the `pythonSrc` and `pythonSrc/ext` directories from the
source code.
- Updated the `Makefile`, `configure` and other related files to remove
  the *pythonsrc_ext* related references.

Instead building the Python packages like psutil, pygresql and pyyaml
via the source code when running the Cloudberry Demo cluster, we can
install them via the command under the top dir:

```
pip3 install -r requirements.txt
```
@tuhaihe tuhaihe force-pushed the remove-bundles-pyfiles branch from e330ea1 to 694e4e9 Compare April 7, 2025 10:28
@tuhaihe tuhaihe requested a review from Copilot April 7, 2025 10:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 38 out of 43 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • configure: Language not supported
  • configure.ac: Language not supported
  • gpAux/Makefile: Language not supported
  • gpMgmt/Makefile: Language not supported
  • src/Makefile.global.in: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/coverity.yml:109

  • Confirm that the removal of the '--with-pythonsrc-ext' option in the Coverity workflow does not inadvertently impact any necessary Python component analysis or scanning.
--with-pythonsrc-ext \

@tuhaihe
Copy link
Copy Markdown
Member Author

tuhaihe commented Apr 7, 2025

For the test suite to run successfully, this additional command needs to be included in the apache-devops-release build script.

pip3 install -r requirements.txt

If this PR seems good, then I can update the related file.

This PR is experimental; if there are any issues, feel free to let me know.

@tuhaihe tuhaihe changed the title [WIP] Remove unnecessary bundled Python packages Remove bundled Python packages Apr 7, 2025
@tuhaihe tuhaihe marked this pull request as draft April 21, 2025 06:50
@tuhaihe
Copy link
Copy Markdown
Member Author

tuhaihe commented Apr 28, 2025

We need to cherry-pick these commits from GP to replace pygresql and other python packages with the distro's python packages: #1067.

So close this PR.

@tuhaihe tuhaihe closed this Apr 28, 2025
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.

2 participants