Skip to content

Commit 2c74ad8

Browse files
hwpangJacksonBurns
authored andcommitted
keys(CondaPkg.current_packages()) doesn't actually show the packages that are only available locally
1 parent e8543d8 commit 2c74ad8

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

deps/build.jl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
using CondaPkg
22
using PythonCall
3-
packages = keys(CondaPkg.current_packages())
4-
if !("rmg" in packages) && !("rmgmolecule" in packages)
3+
4+
has_rmgpy = true
5+
has_rmgmolecule = true
6+
try
7+
PythonCall.pyimport("rmgpy")
8+
catch
9+
has_rmgpy = false
10+
end
11+
try
12+
PythonCall.pyimport("rmgmolecule")
13+
catch
14+
has_rmgmolecule = false
15+
end
16+
17+
if !has_rmgpy && !has_rmgmolecule
518

619
if !(v"3.7" <= PythonCall.C.python_version() && PythonCall.C.python_version() <= v"3.9")
720
CondaPkg.add("python"; version=">=3.9")

0 commit comments

Comments
 (0)