Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
west-public
West
Commits
70d20371
Commit
70d20371
authored
Feb 06, 2020
by
Marco Govoni
Browse files
Added VERSION.json
parent
0598cde6
Changes
8
Show whitespace changes
Inline
Side-by-side
.gitignore
View file @
70d20371
...
@@ -10,6 +10,5 @@
...
@@ -10,6 +10,5 @@
*.out
*.out
doc/_build/
doc/_build/
Modules/west_version.f90
Modules/west_version.f90
Pytools/setup.py
west_make.inc
west_make.inc
*/__pycache__
*/__pycache__
Makefile
View file @
70d20371
# Makefile for the WEST software
# Makefile for the WEST software
include
./VERSION
include
../make.inc
include
../make.inc
default
:
all
default
:
@
echo
"Welcome to WEST!"
@
echo
' '
@
echo
'to install WEST, type at the shell prompt:'
@
echo
' make conf PYT=python-3'
@
echo
' make [-j] target'
@
echo
' '
@
echo
'where target identifies one or multiple packages'
@
echo
' wstat calculation of static dielectric response using PDEP'
@
echo
' wfreq calculation of dynamical dielectric response and GW self-energy'
@
echo
' westpp postprocessing programs'
@
echo
' all same as "make wstat wfreq westpp"'
@
echo
' '
@
echo
'where target is one of the following operations:'
@
echo
' doc build WEST documentation'
@
echo
' '
@
echo
' clean remove executables and objects'
@
echo
' veryclean remove files produced by "configure" as well'
conf
:
conf
:
@
[
"
${PYT}
"
]
||
(
echo
">> PYT is not set. Ex: make conf PYT=python3"
;
exit
1
)
@
[
"
${PYT}
"
]
||
(
echo
">> PYT is not set. Ex: make conf PYT=python3"
;
exit
1
)
@
echo
"# WEST_VERSION_NUMBER :
${WEST_VERSION_NUMBER}
"
@
echo
"Welcome to WEST!"
@
echo
' '
@
echo
"version :
`
${PYT}
./Pytools/read_json.py VERSION.json version
`
"
@
echo
"url :
`
${PYT}
./Pytools/read_json.py VERSION.json url
`
"
@
echo
"license :
`
${PYT}
./Pytools/read_json.py VERSION.json license
`
"
@
echo
" "
>
west_make.inc
@
echo
" "
>
west_make.inc
@
echo
WESTDIR
=
`
pwd
`
>>
west_make.inc
@
echo
WESTDIR
=
`
pwd
`
>>
west_make.inc
@
echo
PYT
=
${PYT}
>>
west_make.inc
@
echo
PYT
=
${PYT}
>>
west_make.inc
...
@@ -29,7 +49,7 @@ report_build_vars :
...
@@ -29,7 +49,7 @@ report_build_vars :
@
echo
" "
@
echo
" "
@
[
"
${MPIF90}
"
]
||
(
echo
">> MPIF90 is not set."
;
exit
1
)
@
[
"
${MPIF90}
"
]
||
(
echo
">> MPIF90 is not set."
;
exit
1
)
@
[
"
${CC}
"
]
||
(
echo
">> CC is not set."
;
exit
1
)
@
[
"
${CC}
"
]
||
(
echo
">> CC is not set."
;
exit
1
)
@
echo
"# WEST_VERSION_NUMBER :
${
WEST_VERSION_NUMBER}
"
@
echo
"# WEST_VERSION_NUMBER :
`
${
PYT}
./Pytools/read_json.py VERSION.json version
`
"
@
echo
"# WESTDIR :
${WESTDIR}
"
@
echo
"# WESTDIR :
${WESTDIR}
"
@
echo
"# FDFLAGS :
${FDFLAGS}
"
@
echo
"# FDFLAGS :
${FDFLAGS}
"
@
echo
"# IFLAGS :
${IFLAGS}
"
@
echo
"# IFLAGS :
${IFLAGS}
"
...
@@ -100,6 +120,12 @@ wstat \
...
@@ -100,6 +120,12 @@ wstat \
wfreq
\
wfreq
\
westpp
westpp
doc
:
check_conf
if
test
-d
doc
;
then
\
(
cd
doc
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
html
;
\
else
$(MAKE)
$(MFLAGS)
html
;
fi
)
;
fi
@
echo
'Open the file:
${WESTDIR}
/doc/_build/html/index.html'
pytools_do
:
pytools_do
:
if
test
-d
Pytools
;
then
\
if
test
-d
Pytools
;
then
\
(
cd
Pytools
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
(
cd
Pytools
;
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
...
@@ -112,7 +138,7 @@ libraries_do:
...
@@ -112,7 +138,7 @@ libraries_do:
modules_do
:
modules_do
:
if
test
-d
Modules
;
then
\
if
test
-d
Modules
;
then
\
(
cd
Modules
;
sh ./update_west_version
${WESTDIR}
${
WEST_VERSION_NUMBER}
;
\
(
cd
Modules
;
sh ./update_west_version
${WESTDIR}
`
${
PYT}
../Pytools/read_json.py ../VERSION.json version
`
;
\
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
if
test
"
$(MAKE)
"
=
""
;
then
make
$(MFLAGS)
all
;
\
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
else
$(MAKE)
$(MFLAGS)
all
;
fi
)
;
fi
...
...
Modules/Makefile
View file @
70d20371
# Makefile for Modules
# Makefile for Modules
include
../VERSION
include
../west_make.inc
include
../west_make.inc
include
../../make.inc
include
../../make.inc
...
@@ -27,7 +26,7 @@ tldeps:
...
@@ -27,7 +26,7 @@ tldeps:
test
-n
"
$(TLDEPS)
"
&&
(
cd
../..
;
$(MAKE)
$(MFLAGS)
$(TLDEPS)
||
exit
1
)
||
:
test
-n
"
$(TLDEPS)
"
&&
(
cd
../..
;
$(MAKE)
$(MFLAGS)
$(TLDEPS)
||
exit
1
)
||
:
update
:
update
:
./update_west_version
${WESTDIR}
${
WEST_VERSION_NUMBER}
./update_west_version
${WESTDIR}
`
${
PYT}
../Pytools/read_json.py ../VERSION.json version
`
libmodules.a
:
$(MODULES_OBJS)
libmodules.a
:
$(MODULES_OBJS)
$(AR)
$(ARFLAGS)
$@
$?
$(AR)
$(ARFLAGS)
$@
$?
...
...
Pytools/Makefile
View file @
70d20371
#PYT=python3
#PYT=python3
include
../west_make.inc
include
../west_make.inc
include
../VERSION
all
:
\
all
:
\
title
\
title
\
install
install
install
:
install
:
cat
setup.py.in |
sed
"s,checkit,
${WEST_VERSION_NUMBER}
,"
>
setup.py
-
${PYT}
setup.py
install
--user
--prefix
=
--record
files.txt
-
${PYT}
setup.py
install
--user
--prefix
=
--record
files.txt
clean
:
clean
:
...
...
Pytools/setup.py.in
deleted
100644 → 0
View file @
0598cde6
from setuptools import setup
from setuptools import find_packages
setup(name="west",
version="checkit",
packages=find_packages(),
description='installation script for WEST',
url='https://west-code.org',
author='Marco Govoni',
author_email='mgovoni@anl.gov',
license='GPLv3',
install_requires=[
'numpy',
'scipy',
'matplotlib',
'pyyaml',
'datetime',
'setuptools'
],
python_requires='>=3.6, <4',
zip_safe=True)
VERSION
deleted
100644 → 0
View file @
0598cde6
WEST_VERSION_NUMBER=4.2.0p
VERSION.json
0 → 100644
View file @
70d20371
{
"name"
:
"WEST"
,
"version"
:
"4.2.0p"
,
"url"
:
"http://west-code.org"
,
"license"
:
"GPLv3"
}
doc/conf.py
View file @
70d20371
import
sys
import
sys
import
os
import
os
import
shlex
#import shlex
import
json
import
sphinx_rtd_theme
import
sphinx_rtd_theme
from
unittest.mock
import
MagicMock
#
from unittest.mock import MagicMock
class
Mock
(
MagicMock
):
#
class Mock(MagicMock):
@
classmethod
#
@classmethod
def
__getattr__
(
cls
,
name
):
#
def __getattr__(cls, name):
if
name
==
'_mock_methods'
:
#
if name == '_mock_methods':
return
[]
#
return []
if
name
==
'version_tuple'
:
#
if name == 'version_tuple':
return
(
3
,
0
)
#
return (3,0)
return
Mock
()
#
return Mock()
MOCK_MODULES
=
[
'pymongo'
,
'gridfs'
,
'mpi4py'
]
#MOCK_MODULES = ['pymongo', 'gridfs', 'mpi4py']
sys
.
modules
.
update
((
mod_name
,
Mock
())
for
mod_name
in
MOCK_MODULES
)
#sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
with
open
(
'../VERSION.json'
,
"r"
)
as
file
:
data
=
json
.
load
(
file
)
# If extensions (or modules to document with autodoc) are in another directory,
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# add these directories to sys.path here. If the directory is relative to the
...
@@ -55,8 +59,8 @@ source_suffix = '.rst'
...
@@ -55,8 +59,8 @@ source_suffix = '.rst'
master_doc
=
'index'
master_doc
=
'index'
# General information about the project.
# General information about the project.
project
=
u
'west'
project
=
data
[
"name"
]
copyright
=
u
'20
19
, Marco Govoni'
copyright
=
u
'20
20
, Marco Govoni'
author
=
u
'Marco Govoni'
author
=
u
'Marco Govoni'
# The version info for the project you're documenting, acts as replacement for
# The version info for the project you're documenting, acts as replacement for
...
@@ -64,7 +68,7 @@ author = u'Marco Govoni'
...
@@ -64,7 +68,7 @@ author = u'Marco Govoni'
# built documents.
# built documents.
#
#
# The short X.Y version.
# The short X.Y version.
version
=
'4.1.0'
version
=
data
[
"version"
]
# The full version, including alpha/beta/rc tags.
# The full version, including alpha/beta/rc tags.
release
=
version
release
=
version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment