Skip to content

Commit

Permalink
so pip can not keep build dependencies in order
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov authored Jun 19, 2024
1 parent 932d7cf commit 01c0812
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
5 changes: 5 additions & 0 deletions CondaPkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[pip.deps]
numpy = "<2"
scipy = ""
pymatching = ""
ldpc = "@https://github.com/QuantumSavory/ldpc/archive/refs/heads/numpy2.zip"
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ authors = ["Stefan Krastanov <[email protected]>"]
version = "0.2.1"

[deps]
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"

[compat]
Expand Down
22 changes: 0 additions & 22 deletions src/PyQDecoders.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module PyQDecoders

import CondaPkg
import PythonCall

const sp = PythonCall.pynew()
Expand All @@ -11,26 +9,6 @@ const ldpc = PythonCall.pynew()
const ldpccodes = PythonCall.pynew()

function __init__()
println("NUMPY")
println("###\n###\n###\n###\n###\n###\n###\n###\n###\n###\n")
CondaPkg.add_pip("numpy"; version="<2")
println("SCIPY")
println("###\n###\n###\n###\n###\n###\n###\n###\n###\n###\n")
CondaPkg.add_pip("scipy")
println("LDPC")
println("###\n###\n###\n###\n###\n###\n###\n###\n###\n###\n")
CondaPkg.add_pip("ldpc"; version="@https://github.com/QuantumSavory/ldpc/archive/refs/heads/numpy2.zip")
println("PYMATCHING")
println("###\n###\n###\n###\n###\n###\n###\n###\n###\n###\n")
CondaPkg.add_pip("pymatching")
println("STATUS")
println("###\n###\n###\n###\n###\n###\n###\n###\n###\n###\n")
CondaPkg.status()
CondaPkg.resolve(; force=false)
CondaPkg.status()
CondaPkg.update()
CondaPkg.status()

PythonCall.pycopy!(sp, PythonCall.pyimport("scipy"))
PythonCall.pycopy!(sps, PythonCall.pyimport("scipy.sparse"))
PythonCall.pycopy!(np, PythonCall.pyimport("numpy"))
Expand Down

0 comments on commit 01c0812

Please sign in to comment.