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

Cythonize a pure python file #115

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ $PYTHON -m conda init --install
if [[ $(uname -o) == Msys ]]; then
sed -i "s|CONDA_EXE=.*|CONDA_EXE=\'${PREFIXW//\\/\\\\}\\\\Scripts\\\\conda.exe\'|g" $PREFIX/etc/profile.d/conda.sh
fi

cd $SP_DIR/conda/common
cythonize -i _logic.py
17 changes: 17 additions & 0 deletions recipe/cythonize.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/conda/common/_logic.py b/conda/common/_logic.py
index 2852bfdbc..55c64cbc3 100644
--- a/conda/common/_logic.py
+++ b/conda/common/_logic.py
@@ -669,7 +669,11 @@ class Clauses(object):

lo = 0
try0 = 0
- for peak in ((True, False) if maxval > 1 else (False,)):
+ if maxval > 1:
+ peaks = (True, False)
+ else:
+ peaks = (False,)
+ for peak in peaks:
if peak:
log.trace('Beginning peak minimization')
objval = peak_val
3 changes: 3 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ source:
sha256: 123fc5b953fb62d85351f9f87b22b3849791d4d9818d790fe66e740058619259
patches:
- gh9764.patch
- cythonize.patch

build:
number: 1
Expand All @@ -30,6 +31,7 @@ requirements:
- m2-filesystem # [win]
- m2-bash # [win]
- m2-base # [win]
- {{ compiler('c') }} # [unix and python_impl=="cpython"]

host:
- python
Expand All @@ -40,6 +42,7 @@ requirements:
- pip
- ruamel_yaml >=0.11.14,<0.16
- setuptools >=31.0.1
- cython # [unix and python_impl == "cpython"]
run:
- python
- conda-package-handling >=1.3.0
Expand Down