-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Add python-abi3 #28743
Merged
Merged
Add python-abi3 #28743
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
This file contains 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,27 @@ | ||
Copyright (c) 2015-2023, conda-forge | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of staged-recipes nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains 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,11 @@ | ||
:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. | ||
:: This will allow them to be run on environment activation. | ||
FOR %%F IN (activate deactivate) DO ( | ||
if not exist %PREFIX%\etc\conda\%%F.d MKDIR %PREFIX%\etc\conda\%%F.d | ||
if errorlevel 1 exit 1 | ||
sed "s/@PY_LIMITED_API/%PY_LIMITED_API%/g" %RECIPE_DIR%\scripts\%%F.bat >> %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat | ||
:: We also copy .sh scripts to be able to use them | ||
:: with POSIX CLI on Windows. | ||
sed "s/@PY_LIMITED_API/%PY_LIMITED_API%/g" %RECIPE_DIR%\scripts\%%F.sh >> %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.sh | ||
if errorlevel 1 exit 1 | ||
) |
This file contains 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,7 @@ | ||
# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. | ||
# This will allow them to be run on environment activation. | ||
for CHANGE in "activate" "deactivate" | ||
do | ||
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" | ||
sed "s/@PY_LIMITED_API@/${PY_LIMITED_API}/g" "${RECIPE_DIR}/scripts/${CHANGE}.sh" >> "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" | ||
done |
This file contains 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,3 @@ | ||
noarch_platforms: | ||
- linux_64 | ||
- win_64 |
This file contains 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,15 @@ | ||
version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
version_hex: | ||
- "0x03090000" | ||
- "0x030a0000" | ||
- "0x030b0000" | ||
- "0x030c0000" | ||
- "0x030d0000" | ||
zip_keys: | ||
- - version | ||
- version_hex |
This file contains 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,46 @@ | ||
package: | ||
name: python-abi3-package-sample | ||
version: 0.0.1 | ||
|
||
source: | ||
url: https://github.com/joerick/python-abi3-package-sample/archive/6f74ae7b31e58ef5f8f09b647364854122e61155.tar.gz | ||
sha256: e81fd4d4c4f5b7bc9786d9ee990afc659e14a25ce11182b7b69f826407cc1718 | ||
|
||
build: | ||
number: 0 | ||
python_version_independent: true # [is_abi3] | ||
script: {{ PYTHON }} -m pip install . -vv | ||
skip: True # [is_abi3 and not is_python_min] | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ stdlib('c') }} | ||
host: | ||
- python-abi3 # [is_abi3] | ||
- python | ||
- pip | ||
- setuptools | ||
run: | ||
- python | ||
|
||
test: | ||
imports: | ||
- spam | ||
requires: | ||
- pip | ||
- abi3audit | ||
commands: | ||
- pip check | ||
- abi3audit $SP_DIR/spam.abi3.so -s -v --assume-minimum-abi3 {{ python_min }} # [unix] | ||
- abi3audit %SP_DIR%/spam.dll -s -v --assume-minimum-abi3 {{ python_min }} # [win] | ||
|
||
about: | ||
home: https://github.com/joerick/python-abi3-package-sample | ||
summary: 'ABI3 example' | ||
license: Apache-2.0 | ||
license_file: LICENSE | ||
|
||
extra: | ||
recipe-maintainers: | ||
- isuruf |
This file contains 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,61 @@ | ||
{% if version is not defined %} | ||
{% set version = "3.9" %} | ||
{% endif %} | ||
|
||
package: | ||
name: python-abi3-split | ||
version: {{ version }} | ||
|
||
build: | ||
number: 0 | ||
|
||
outputs: | ||
- name: python-abi3 | ||
build: | ||
noarch: generic | ||
run_exports: | ||
- _python_abi3_support 1.* | ||
- python >={{ version }} | ||
script_env: | ||
- PY_LIMITED_API={{ version_hex }} | ||
requirements: | ||
build: | ||
- sed # [unix] | ||
- m2-sed # [win] | ||
host: | ||
run: | ||
- python {{ version }} | ||
- _python_abi3_support | ||
- __unix # [unix] | ||
- __win # [win] | ||
test: | ||
commands: | ||
- echo "hello world!" | ||
|
||
- name: _python_abi3_support | ||
version: 1.0 | ||
build: | ||
noarch: generic | ||
requirements: | ||
run: | ||
- cpython | ||
- python-gil | ||
test: | ||
commands: | ||
- echo "hello world!" | ||
|
||
about: | ||
home: https://github.com/conda-forge/python-abi3-feedstock | ||
summary: 'Support Python ABI3 packages on conda' | ||
description: | | ||
python-abi3 package can be used for supporting ABI3 packages on | ||
conda-forge. ABI3 supports building a C extension for one specific | ||
CPython version and make it work on any later version. | ||
(freethreading is not supported) | ||
license: MIT | ||
license_file: LICENSE.txt | ||
|
||
extra: | ||
feedstock-name: python-abi3 | ||
recipe-maintainers: | ||
- isuruf |
This file contains 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,2 @@ | ||
export PY_LIMITED_API="@PY_LIMITED_API@" | ||
export CPPFLAGS="${CPPFLAGS} -DPy_LIMITED_API=@PY_LIMITED_API@" |
This file contains 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 @@ | ||
unset PY_LIMITED_API |
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.
I think you forgot to create the bat versions of the activation scripts. This didn't fail here because this call didn't have an
if errorlevel
.