Skip to content

Commit

Permalink
attempt to resolve conda env only once
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Jul 1, 2024
1 parent 67f59b3 commit 75b3126
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
19 changes: 12 additions & 7 deletions src/ReactionMechanismSimulator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ if !("rmg" in packages) && !("rmgmolecule" in packages)
end
if py_version === nothing || !(v"3.7" <= py_version && py_version <= v"3.9")
@info "python version was not in 3.7-3.9 changing python version"
CondaPkg.add("python"; version="3.9")
@info "python 3.9 installed"
CondaPkg.add("python"; version="3.9",resolve=false)
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
CondaPkg.resolve()
else
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
CondaPkg.resolve()
end
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
@assert false
CondaPkg.add("matplotlib", channel="conda-forge")
CondaPkg.add("rdkit", channel="conda-forge")
CondaPkg.add("pydot", channel="conda-forge")

Pkgc = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
Pkgc.build("PythonCall")
end
Expand Down
19 changes: 12 additions & 7 deletions src/rmstest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ if !("rmg" in packages) && !("rmgmolecule" in packages)
end
if py_version === nothing || !(v"3.7" <= py_version && py_version <= v"3.9")
@info "python version was not in 3.7-3.9 changing python version"
CondaPkg.add("python"; version="3.9")
@info "python 3.9 installed"
CondaPkg.add("python"; version="3.9",resolve=false)
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
CondaPkg.resolve()
else
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
CondaPkg.resolve()
end
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
@assert false
CondaPkg.add("matplotlib", channel="conda-forge")
CondaPkg.add("rdkit", channel="conda-forge")
CondaPkg.add("pydot", channel="conda-forge")

Pkgc = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
Pkgc.build("PythonCall")
end
Expand Down

0 comments on commit 75b3126

Please sign in to comment.