Skip to content

Commit 75b3126

Browse files
committed
attempt to resolve conda env only once
1 parent 67f59b3 commit 75b3126

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

src/ReactionMechanismSimulator.jl

+12-7
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@ if !("rmg" in packages) && !("rmgmolecule" in packages)
1313
end
1414
if py_version === nothing || !(v"3.7" <= py_version && py_version <= v"3.9")
1515
@info "python version was not in 3.7-3.9 changing python version"
16-
CondaPkg.add("python"; version="3.9")
17-
@info "python 3.9 installed"
16+
CondaPkg.add("python"; version="3.9",resolve=false)
17+
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
18+
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
19+
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
20+
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
21+
CondaPkg.resolve()
22+
else
23+
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
24+
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
25+
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
26+
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
27+
CondaPkg.resolve()
1828
end
19-
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
2029
@assert false
21-
CondaPkg.add("matplotlib", channel="conda-forge")
22-
CondaPkg.add("rdkit", channel="conda-forge")
23-
CondaPkg.add("pydot", channel="conda-forge")
24-
2530
Pkgc = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
2631
Pkgc.build("PythonCall")
2732
end

src/rmstest.jl

+12-7
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ if !("rmg" in packages) && !("rmgmolecule" in packages)
1414
end
1515
if py_version === nothing || !(v"3.7" <= py_version && py_version <= v"3.9")
1616
@info "python version was not in 3.7-3.9 changing python version"
17-
CondaPkg.add("python"; version="3.9")
18-
@info "python 3.9 installed"
17+
CondaPkg.add("python"; version="3.9",resolve=false)
18+
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
19+
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
20+
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
21+
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
22+
CondaPkg.resolve()
23+
else
24+
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541",resolve=false)
25+
CondaPkg.add("matplotlib", channel="conda-forge",resolve=false)
26+
CondaPkg.add("rdkit", channel="conda-forge",resolve=false)
27+
CondaPkg.add("pydot", channel="conda-forge",resolve=false)
28+
CondaPkg.resolve()
1929
end
20-
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
2130
@assert false
22-
CondaPkg.add("matplotlib", channel="conda-forge")
23-
CondaPkg.add("rdkit", channel="conda-forge")
24-
CondaPkg.add("pydot", channel="conda-forge")
25-
2631
Pkgc = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
2732
Pkgc.build("PythonCall")
2833
end

0 commit comments

Comments
 (0)