-
-
Notifications
You must be signed in to change notification settings - Fork 108
Use sysconfigdata and build-details.json from shared library build
#842
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
Open
mgorny
wants to merge
7
commits into
conda-forge:dev
Choose a base branch
from
mgorny:ldlibrary-so
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+188
−83
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c237464
Use sysconfigdata from shared library build
mgorny dc22d85
Also use shared-lib `build-details.json`
mgorny 0e83970
Add missing ripgrep dep to the test case
mgorny b422d66
Fix the linking test case
mgorny 622caf6
MNT: Re-rendered with conda-smithy 3.54.1 and conda-forge-pinning 202…
mgorny 6eeda71
Split shared Python library to `libpython`
mgorny a407c5d
MNT: Re-rendered with conda-smithy 3.54.1 and conda-forge-pinning 202…
mgorny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/bash | ||
| set -ex | ||
|
|
||
| _buildd_shared=build-shared | ||
| if [[ ${PY_INTERP_DEBUG} == yes ]]; then | ||
| DBG=d | ||
| else | ||
| DBG= | ||
| fi | ||
| if [[ ${PY_FREETHREADING} == yes ]]; then | ||
| # This Python will not be usable with non-free threading Python modules. | ||
| THREAD=t | ||
| else | ||
| THREAD= | ||
| fi | ||
|
|
||
| VER=${PKG_VERSION%.*} | ||
| ABIFLAGS=${DBG}${THREAD} | ||
| VERABI=${VER}${THREAD}${DBG} | ||
| VERABI_NO_DBG=${VER}${THREAD} | ||
|
|
||
| # Install the shared library (for people who embed Python only, e.g. GDB). | ||
| # Linking module extensions to this on Linux is redundant (but harmless). | ||
| # Linking module extensions to this on Darwin is harmful (multiply defined symbols). | ||
| shopt -s extglob | ||
| cp -pf ${_buildd_shared}/libpython*${SHLIB_EXT}!(.lto) ${PREFIX}/lib/ | ||
| shopt -u extglob | ||
| if [[ ${target_platform} =~ .*linux.* ]]; then | ||
| ln -sf ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT}.1.0 ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} | ||
| fi | ||
| if [[ ${PY_INTERP_DEBUG} == yes ]]; then | ||
| ln -s ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} ${PREFIX}/lib/libpython${VERABI_NO_DBG}${SHLIB_EXT} | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,10 @@ | ||
| # https://martinopilia.com/posts/2018/09/15/building-python-extension.html | ||
| # FindPythonInterp and FindPythonLibs are deprecated since cmake 3.12 | ||
| # These can be replaced by find_package(Python ${PY_VER} REQUIRED) | ||
| # But these are still used by other packages, so we keep them. | ||
| # https://scikit-build-core.readthedocs.io/en/latest/guide/cmakelists.html#finding-python | ||
|
|
||
| cmake_minimum_required(VERSION 3.10) | ||
| enable_language(C) | ||
| project(mymath) | ||
|
|
||
| option(PY_VER, "Python version to use") | ||
| option(PY_VER "Python version to use") | ||
| option(EXTRA_COMPONENTS "Additional Python components to check for") | ||
|
|
||
| find_package(PythonInterp ${PY_VER} REQUIRED) | ||
| # PATHS $ENV{CONDA_PREFIX} | ||
|
|
||
| # This goes after, since it uses PythonInterp as hint | ||
| find_package(PythonLibs ${PY_VER} REQUIRED) | ||
| find_package(Python ${PY_VER} COMPONENTS Interpreter ${EXTRA_COMPONENTS} REQUIRED) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover from debugging?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's actually used in tests. However, it was listed only for
pythonoutput and was missing forlibpython-static.