Skip to content

Commit a857031

Browse files
committed
Update build to use CondaPkg
1 parent 82e1d58 commit a857031

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

deps/build.jl

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
using PyCall
2-
using Conda
3-
packages = Conda._installed_packages()
4-
if !("rmg" in packages) && !("rmgmolecule" in packages) && (PyCall.pyversion.major != 3 || PyCall.pyversion.minor != 7)
5-
const Pkg = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
6-
Conda.rm("mamba")
7-
Conda.add("conda=4")
8-
Conda.add("mamba")
9-
Conda.update()
10-
Conda.add("python=3.7")
11-
try
12-
Conda.rm("numpy") #get around MKL problem
13-
catch e
1+
using CondaPkg
2+
using PythonCall
3+
packages = keys(CondaPkg.current_packages())
4+
if !("rmg" in packages) && !("rmgmolecule" in packages)
5+
6+
if !(v"3.7" <= PythonCall.C.python_version() && PythonCall.C.python_version() <= v"3.9")
7+
CondaPkg.add("python"; version="3.9")
148
end
15-
Conda.add("nomkl")
16-
Conda.add("numpy")
17-
Conda.add_channel("mjohnson541")
18-
Conda.add_channel("hwpang")
19-
Conda.add("rmgmolecule")
20-
Pkg.build("PyCall")
21-
end
9+
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
10+
CondaPkg.add("matplotlib", channel="conda-forge")
11+
CondaPkg.add("rdkit", channel="conda-forge")
12+
CondaPkg.add("pydot", channel="conda-forge")
13+
end
14+
15+
const Pkg = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
16+
Pkg.build("PythonCall")

0 commit comments

Comments
 (0)