Skip to content

Commit

Permalink
Merge pull request #340 from Inkrementator/master
Browse files Browse the repository at this point in the history
Make examples compile for newest python version
  • Loading branch information
atilaneves committed Apr 22, 2024
2 parents e0d1359 + a3c3ee8 commit 1d7d198
Show file tree
Hide file tree
Showing 129 changed files with 1,690 additions and 268 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ examples/simple/simple
examples/simple/Simple.cs
obj
.ropeproject
.direnv
.direnv

# Generated by `dub run pyd:setup`
pyd_get_env_set_text.py
pyd_set_env_vars.sh
2 changes: 1 addition & 1 deletion dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"fileVersion": 1,
"versions": {
"mirror": "0.3.2",
"monty": "0.0.4",
"monty": "0.0.12",
"unit-threaded": "2.0.3"
}
}
21 changes: 21 additions & 0 deletions examples/issues/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ dflags "-allinst"
dependency "vibe-d:redis" version="*"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
Expand Down
26 changes: 15 additions & 11 deletions examples/issues/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,26 @@
"fileVersion": 1,
"versions": {
"autowrap": {"path":"../../"},
"botan": "1.12.18",
"botan-math": "1.0.3",
"diet-ng": "1.8.1",
"eventcore": "0.9.20",
"eventcore": "0.9.30",
"libasync": "0.8.6",
"memutils": "1.0.4",
"memutils": "1.0.10",
"mir-linux-kernel": "1.0.1",
"mirror": "0.3.2",
"monty": "0.0.1",
"openssl": "3.2.2",
"pyd": "0.14.3",
"mirror": "0.3.3",
"monty": "0.0.12",
"openssl": "3.3.3",
"openssl-static": "1.0.3+3.0.8",
"pyd": "0.14.4",
"scriptlike": "0.10.3",
"stdx-allocator": "2.77.5",
"taggedalgebraic": "0.11.22",
"unit-threaded": "2.1.2",
"vibe-core": "1.22.4",
"vibe-d": "0.9.5"
"unit-threaded": "2.1.9",
"vibe-container": "1.3.1",
"vibe-core": "2.8.4",
"vibe-d": "0.10.0",
"vibe-http": "1.0.0",
"vibe-inet": "1.0.0",
"vibe-serialization": "1.0.2",
"vibe-stream": "1.1.0"
}
}
21 changes: 21 additions & 0 deletions examples/numpy/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@ name "numpy"
targetType "dynamicLibrary"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
Expand Down
7 changes: 4 additions & 3 deletions examples/numpy/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"fileVersion": 1,
"versions": {
"autowrap": {"path":"../../"},
"mirror": "0.3.2",
"pyd": "0.14.3",
"unit-threaded": "1.0.4"
"mirror": "0.3.3",
"monty": "0.0.12",
"pyd": "0.14.4",
"unit-threaded": "2.1.9"
}
}
21 changes: 21 additions & 0 deletions examples/phobos/create.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ void run(string[] args) @safe {
targetType "dynamicLibrary"
configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:python" path="../../.."
subConfiguration "autowrap:python" "python311"
}
configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:python" path="../../.."
subConfiguration "autowrap:python" "python310"
}
configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:python" path="../../.."
subConfiguration "autowrap:python" "python39"
}
configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
Expand Down
21 changes: 21 additions & 0 deletions examples/phobos/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@ name "phobos"
targetType "dynamicLibrary"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
Expand Down
2 changes: 1 addition & 1 deletion examples/phobos/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"versions": {
"autowrap": {"path":"../../"},
"mirror": "0.3.2",
"pyd": "0.14.3",
"pyd": "0.14.4,
"unit-threaded": "1.0.4"
}
}
23 changes: 22 additions & 1 deletion examples/phobos/std_algorithm/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@ name "std_algorithm"
targetType "dynamicLibrary"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python38"
}

Expand Down
7 changes: 4 additions & 3 deletions examples/phobos/std_algorithm/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"fileVersion": 1,
"versions": {
"autowrap": {"path":"../../.."},
"mirror": "0.3.2",
"pyd": "0.14.3",
"unit-threaded": "1.0.4"
"mirror": "0.3.3",
"monty": "0.0.12",
"pyd": "0.14.4",
"unit-threaded": "2.1.9"
}
}
23 changes: 22 additions & 1 deletion examples/phobos/std_array/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@ name "std_array"
targetType "dynamicLibrary"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python38"
}

Expand Down
7 changes: 4 additions & 3 deletions examples/phobos/std_array/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"fileVersion": 1,
"versions": {
"autowrap": {"path":"../../.."},
"mirror": "0.3.2",
"pyd": "0.14.3",
"unit-threaded": "1.0.4"
"mirror": "0.3.3",
"monty": "0.0.12",
"pyd": "0.14.4",
"unit-threaded": "2.1.9"
}
}
23 changes: 22 additions & 1 deletion examples/phobos/std_ascii/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@ name "std_ascii"
targetType "dynamicLibrary"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python38"
}

Expand Down
7 changes: 4 additions & 3 deletions examples/phobos/std_ascii/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"fileVersion": 1,
"versions": {
"autowrap": {"path":"../../.."},
"mirror": "0.3.2",
"pyd": "0.14.3",
"unit-threaded": "1.0.4"
"mirror": "0.3.3",
"monty": "0.0.12",
"pyd": "0.14.4",
"unit-threaded": "2.1.9"
}
}
23 changes: 22 additions & 1 deletion examples/phobos/std_base64/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@ name "std_base64"
targetType "dynamicLibrary"


configuration "python311" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python311"
}

configuration "python310" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python310"
}

configuration "python39" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python39"
}

configuration "python38" {
targetPath "lib/pyd"
lflags "-L$PYTHON_LIB_DIR"
dependency "autowrap:pyd" path="../../"
dependency "autowrap:pyd" path="../../.."
subConfiguration "autowrap:pyd" "python38"
}

Expand Down
7 changes: 4 additions & 3 deletions examples/phobos/std_base64/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"fileVersion": 1,
"versions": {
"autowrap": {"path":"../../.."},
"mirror": "0.3.2",
"pyd": "0.14.3",
"unit-threaded": "1.0.4"
"mirror": "0.3.3",
"monty": "0.0.12",
"pyd": "0.14.4",
"unit-threaded": "2.1.9"
}
}

0 comments on commit 1d7d198

Please sign in to comment.