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

Fix for conda-forge/python_abi-feedstock#2 #28

Merged
merged 4 commits into from
Feb 11, 2020
Merged
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
20 changes: 10 additions & 10 deletions recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
CHANNEL_NAME = "conda-forge"
CHANNEL_ALIAS = "https://conda-web.anaconda.org"
SUBDIRS = (
#"noarch",
"noarch",
"linux-64",
#"linux-armv7l",
#"linux-aarch64",
#"linux-ppc64le",
#"osx-64",
#"win-32",
#"win-64",
"linux-armv7l",
"linux-aarch64",
"linux-ppc64le",
"osx-64",
"win-32",
"win-64",
beckermr marked this conversation as resolved.
Show resolved Hide resolved
)

REMOVALS = {
Expand Down Expand Up @@ -351,7 +351,7 @@ def add_python_abi(record, subdir):
version = record['version']
new_constrains = record.get('constrains', [])
python_abi = get_python_abi(version, subdir)
new_constrains.append(f"python_abi * {python_abi}")
new_constrains.append(f"python_abi * *_{python_abi}")
record['constrains'] = new_constrains
return

Expand Down Expand Up @@ -380,8 +380,8 @@ def add_python_abi(record, subdir):
python_abi = "cp*"
else:
python_abi = get_python_abi(dep_split[1], subdir)
new_constrains.append(f"python_abi * {python_abi}")
changes.add((dep, f"python_abi * {python_abi}"))
new_constrains.append(f"python_abi * *_{python_abi}")
changes.add((dep, f"python_abi * *_{python_abi}"))
record['constrains'] = new_constrains


Expand Down
3 changes: 2 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package:
name: conda-forge-repodata-patches
version: 20200205
version: 20200211

source:
path: .

Expand Down
8 changes: 4 additions & 4 deletions recipe/test_gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ def test_add_python_abi():
record = copy.deepcopy(record_orig)
add_python_abi(record, "linux-64")
print(record, condition, tag)
assert record["constrains"] == [f"python_abi * {tag}"]
assert record["constrains"] == [f"python_abi * *_{tag}"]

record = copy.deepcopy(record_orig)
add_python_abi(record, "osx-64")
if tag == "cp27mu" or tag == "cp26mu":
assert record["constrains"] == [f"python_abi * {tag[:-1]}"]
assert record["constrains"] == [f"python_abi * *_{tag[:-1]}"]
else:
assert record["constrains"] == [f"python_abi * {tag}"]
assert record["constrains"] == [f"python_abi * *_{tag}"]

python_record = {
"name": "python",
"version": "3.6.8",
}
add_python_abi(python_record, "osx-64")
assert python_record["constrains"] == [f"python_abi * cp36m"]
assert python_record["constrains"] == [f"python_abi * *_cp36m"]

exact_record = {
"name": "foo",
Expand Down