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

--enable-shared by default #2554

Merged
merged 5 commits into from
Dec 23, 2022
Merged

--enable-shared by default #2554

merged 5 commits into from
Dec 23, 2022

Conversation

anton-petrov
Copy link
Member

@anton-petrov anton-petrov commented Dec 8, 2022

Make sure you have checked all steps below.

Prerequisite

  • Please consider implementing the feature as a hook script or plugin as a first step.
    • pyenv has some powerful support for plugins and hook scripts. Please refer to Authoring plugins for details and try to implement it as a plugin if possible.
  • Please consider contributing the patch upstream to rbenv, since we have borrowed most of the code from that project.
    • We occasionally import the changes from rbenv. In general, you can expect changes made in rbenv will be imported to pyenv too, eventually.
    • Generally speaking, we prefer not to make changes in the core in order to keep compatibility with rbenv.
  • My PR addresses the following pyenv issue (if any)

Description

  • Here are some details about my PR

Tests

  • My PR adds the following unit tests (if any)

Comment on lines 809 to 811
if ! is_mac; then
build_package_enable_shared || true
fi
Copy link
Member

Choose a reason for hiding this comment

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

What's the rationale for "non-Mac"?

I only found that it's incompatible with --enable-framwework so we can probably only not apply it if that has been passed.

Copy link
Member

Choose a reason for hiding this comment

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

@anton-petrov anton-petrov marked this pull request as draft December 8, 2022 10:44
@anton-petrov
Copy link
Member Author

Maybe we should experiment with flags and look at how CPython is built in the homebrew:
https://github.com/Homebrew/homebrew-core/blob/51fdfef54d478e1fbfa66724d621c06a44be7a3c/Formula/python%403.11.rb#L139

To take advantage of the existing logic to add to rpath
@anton-petrov anton-petrov self-assigned this Dec 23, 2022
@anton-petrov anton-petrov added the area: build bugs or improvements with `pyenv install` label Dec 23, 2022
@anton-petrov anton-petrov marked this pull request as ready for review December 23, 2022 10:17
@anton-petrov anton-petrov merged commit 773c654 into pyenv:master Dec 23, 2022
@native-api native-api changed the title --enable-shared by default on non-mac systems --enable-shared by default Dec 23, 2022
@nihal111 nihal111 mentioned this pull request Jan 3, 2023
11 tasks
qtprojectorg pushed a commit to qtproject/pyside-pyside-setup that referenced this pull request Oct 11, 2023
- `--config-file` now defaults to pysidedeploy.spec. This enables to
  automatically find the config file, in case if it is present,
  without specifying it through the `--config-file` option.
- Use `pip freeze` also to check if a Python package in installed. This
  is useful for packages like `patchelf` which does not provide
  a Python module, but only an executable.
- Change some `logging.exception()` to actual exceptions because the
  the exception requires some manual intervention for resolution.
- Some of the config options were earlier reevaluated even when an
  existing config file exists. This is now adapted to skip the
  reevaluation when a config file exists.
- In case of pyenv python, add `--static-libpython=no` as extra argument
  accepted by Nuitka. This is because pyenv Python uses `--enable-shared`
  by default since release 2.3.10 -
  pyenv/pyenv#2554
- Some general fixes related to logging.

Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: Ib0fa0ca0ec3a08c07140c0c2fa32f422658d04d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
qtprojectorg pushed a commit to qtproject/pyside-pyside-setup that referenced this pull request Oct 11, 2023
- `--config-file` now defaults to pysidedeploy.spec. This enables to
  automatically find the config file, in case if it is present,
  without specifying it through the `--config-file` option.
- Use `pip freeze` also to check if a Python package in installed. This
  is useful for packages like `patchelf` which does not provide
  a Python module, but only an executable.
- Change some `logging.exception()` to actual exceptions because the
  the exception requires some manual intervention for resolution.
- Some of the config options were earlier reevaluated even when an
  existing config file exists. This is now adapted to skip the
  reevaluation when a config file exists.
- In case of pyenv python, add `--static-libpython=no` as extra argument
  accepted by Nuitka. This is because pyenv Python uses `--enable-shared`
  by default since release 2.3.10 -
  pyenv/pyenv#2554
- Some general fixes related to logging.

Task-number: PYSIDE-1612
Change-Id: Ib0fa0ca0ec3a08c07140c0c2fa32f422658d04d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 6337e4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build bugs or improvements with `pyenv install`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--enable-shared should be default
2 participants