Skip to content

Commit 42cf3a0

Browse files
Merge pull request #220 from ChevronETC/wask/abspath-devitopro
fix devitopro install
2 parents ad9f1ce + 293bc67 commit 42cf3a0

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Devito"
22
uuid = "06ed14b1-0e40-4084-abdf-764a285f8c42"
33
authors = ["Sam Kaplan <Sam.Kaplan@chevron.com>"]
4-
version = "1.1.10"
4+
version = "1.2.0"
55

66
[deps]
77
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"

deps/build.jl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,24 @@ try
5959
# Some python version don't like without --user so bypass it
6060
ENV["PIP_BREAK_SYSTEM_PACKAGES"] = "1"
6161
if dpro_repo != ""
62-
# Devitopro is available (Licensed). Install devitopro that comes with devito
63-
# as a submodule. THis way we install the devito version that is compatible with devitopro
64-
# and we don't need to install devito separately
62+
# Devitopro is available (Licensed). Install devitopro that comes with devito as a submodule.
63+
# This way we install the devito version that is compatible with devitopro and we don't need to
64+
# install devito separately.
6565
# Because devito is a submodule, pip fails to install it properly (pip does not clone with --recursive)
66-
# So we need to clone then install it. And since julia somehow doesn't think submodules exists LibGit2 cannot clone
67-
# the submodules. So we need to clone it with git by hand
68-
dir = "$(tempname())-devitopro"
66+
# So we need to clone recursively, then install. And since julia somehow doesn't think submodules exists LibGit2 cannot clone
67+
# the submodules. So we need to clone it with git by hand.
68+
dir = abspath("$(tempname())-devitopro")
6969
Sys.which("git") === nothing && error("git is not installed")
7070
run(`git clone --recurse-submodules --depth 1 $(dpro_repo) $(dir)`)
7171

72+
cd(dir)
73+
74+
# Install devito[extras,tests]
75+
@info("Install devito[extras,tests]")
76+
pip("$(dir)/submodules/devito[extras,tests]")
77+
7278
# Install devitopro
79+
@info("Install devitopro[extras]")
7380
pip(dir)
7481

7582
# Now all we need is mpi4py. It is straightforward to install except with the nvidia compiler that requires

0 commit comments

Comments
 (0)