Skip to content

Commit 67c1ad6

Browse files
committed
have build operations occur on loading instead
1 parent 6b4d837 commit 67c1ad6

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

deps/build.jl

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/ReactionMechanismSimulator.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
module ReactionMechanismSimulator
22
using PythonCall
33
using CondaPkg
4+
using Logging
45
packages = keys(CondaPkg.current_packages())
6+
7+
if !("rmg" in packages) && !("rmgmolecule" in packages)
8+
@info "missing rmg and rmgmolecule installing rmgmolecule..."
9+
if !(v"3.7" <= PythonCall.C.python_version() && PythonCall.C.python_version() <= v"3.9")
10+
@info "python version was not in 3.7-3.9 changing python version"
11+
CondaPkg.add("python"; version="3.9")
12+
end
13+
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
14+
CondaPkg.add("matplotlib", channel="conda-forge")
15+
CondaPkg.add("rdkit", channel="conda-forge")
16+
CondaPkg.add("pydot", channel="conda-forge")
17+
18+
const Pkg = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
19+
Pkg.build("PythonCall")
20+
end
21+
522
const Chem = PythonCall.pynew()
623
const Desc = PythonCall.pynew()
724
const molecule = PythonCall.pynew()

0 commit comments

Comments
 (0)