west_version.f90.in 1.36 KB
Newer Older
Marco Govoni's avatar
Marco Govoni committed
1
!
2
! Copyright (C) 2015-2017 M. Govoni 
Marco Govoni's avatar
Marco Govoni committed
3
4
5
6
7
8
9
10
11
12
13
14
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
! Contributors to this file: 
! Marco Govoni
!
!-----------------------------------------------------------------------
MODULE west_version
  !-----------------------------------------------------------------------
  !
15
16
  USE forpy_mod, ONLY: list
  !
Marco Govoni's avatar
Marco Govoni committed
17
18
19
20
  IMPLICIT NONE
  !
  SAVE
  !
21
  CHARACTER (LEN=6)  :: west_version_number = '4.0.0'
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  CHARACTER (LEN=512) :: west_git_revision = 'unknown'
  CHARACTER (LEN=512) :: west_forpy_path = 'unset'
  TYPE(list) :: paths 
  !
  CONTAINS
  !
  SUBROUTINE start_forpy()
     USE forpy_mod, ONLY: forpy_initialize, get_sys_path
     IMPLICIT NONE
     INTEGER :: IERR
     !
     IERR = forpy_initialize()
     IF(IERR/=0) CALL errore('forpy','Err: cannot init forpy',1)
     !
     IERR = get_sys_path(paths)
     IF(IERR/=0) CALL errore('forpy','Err: cannot get_sys_path',1)
     !
39
     IERR = paths%append(TRIM(ADJUSTL(west_forpy_path))//"West/Pytools")
40
41
42
43
44
45
46
47
48
     IF(IERR/=0) CALL errore('forpy','Err: cannot append paths',1) 
  END SUBROUTINE
  !
  SUBROUTINE end_forpy()
     USE forpy_mod, ONLY: forpy_finalize
     IMPLICIT NONE
     CALL paths%destroy()
     CALL forpy_finalize()
  END SUBROUTINE
Marco Govoni's avatar
Marco Govoni committed
49
50
  !
END MODULE