Skip to content

Commit dd2a902

Browse files
authored
Update to install instructions... (#386)
Point release 3.2.1. The version bump is due to using new manylinux2010 images.
1 parent ea443fe commit dd2a902

File tree

3 files changed

+57
-35
lines changed

3 files changed

+57
-35
lines changed

INSTALL.md

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,71 @@
1-
# Building MOOSE from source
1+
# Building MOOSE
22

3-
To build `MOOSE` from source, you need `cmake`.
3+
To build `MOOSE` from source, you need `cmake` and `python-setuptools`. We
4+
recommend to use Python 3.5 or higher. Python 2.7 is also supported.
45

5-
Download the latest source code of moose from github.
6-
7-
$ git clone -b master https://github.com/BhallaLab/moose-core --depth 50
8-
9-
## Install dependencies
6+
Before running the following command to build and install, make sure that
7+
followings are installed.
108

119
- gsl-1.16 or higher.
12-
- libhdf5-dev (optional)
13-
- python-dev
1410
- python-numpy
1511

16-
On Ubuntu-14.04 or higher, these can be installed with:
12+
On Ubuntu-16.04 or higher, these dependencies can be installed with:
1713

18-
sudo apt-get install python-dev python-numpy libhdf5-dev cmake libgsl0-dev g++
14+
```
15+
sudo apt-get install python-pip python-numpy cmake libgsl-dev g++
16+
```
1917

20-
SBML support is enabled by installing [python-libsbml](http://sbml.org/Software/libSBML/docs/python-api/libsbml-installation.html). Alternatively, it can be installed by using `python-pip`
18+
Now use `pip` to download and install the `pymoose`.
2119

22-
$ sudo pip install python-libsbml
20+
```
21+
$ pip install git+https://github.com/BhallaLab/moose-core --user
22+
```
23+
24+
## Using cmake (For developers)
25+
26+
`pip` builds `pymoose` with default options, it runs `cmake` behind the scene.
27+
If you are developing moose, build it with different options, or needs to test
28+
and profile it, `cmake` based flow is recommended.
2329

24-
## Use `cmake` to build moose:
30+
Install the required dependencies and download the latest source code of moose
31+
from github.
2532

26-
$ cd /path/to/moose-core
33+
$ git clone https://github.com/BhallaLab/moose-core --depth 50
34+
$ cd moose-core
2735
$ mkdir _build
2836
$ cd _build
2937
$ cmake ..
3038
$ make -j3
3139
$ ctest -j3 --output-on-failure
3240

33-
This will build moose, `ctest` will run few tests to check if build process was successful.
41+
This will build moose, `ctest` will run few tests to check if build process was
42+
successful.
3443

35-
To install MOOSE into non-standard directory, pass additional argument `-DCMAKE_INSTALL_PREFIX=path/to/install/dir` to cmake.
44+
To install MOOSE into non-standard directory, pass additional argument
45+
`-DCMAKE_INSTALL_PREFIX=path/to/install/dir` to during configuration. E.g.,
3646

37-
### Python3
47+
$ mkdir _build && cd _build # inside moose-core directory.
48+
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
49+
$ make && make install
3850

39-
cmake -DPYTHON_EXECUTABLE=/opt/bin/python3 ..
51+
Will build and install pymoose to `~/.local`.
4052

41-
### Install
53+
To use a non-default python installation, set
54+
`PYTHON_EXECUTATBLE=/path/to/python` e.g.,
4255

43-
$ sudo make install
56+
$ cmake -DPYTHON_EXECUTABLE=/opt/bin/python3 ..
4457

4558
## Post installation
4659

4760
Now you can import moose in a Python script or interpreter with the statement:
4861

49-
import moose
50-
moose.test() # will take time. Not all tests will pass.
62+
>>> import moose
63+
>>> moose.test() # will take time. Not all tests will pass.
64+
65+
# Notes
66+
67+
SBML support is enabled by installing
68+
[python-libsbml](http://sbml.org/Software/libSBML/docs/python-api/libsbml-installation.html).
69+
Alternatively, it can be installed by using `python-pip`
70+
71+
$ sudo pip install python-libsbml

MANIFEST.in

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
AUTHORS
2-
CMakeLists.txt
3-
CONTRIBUTING.md
4-
CheckCXXCompiler.cmake
5-
INSTALL.md
6-
LICENSE
7-
MANIFEST.in
8-
README.md
9-
cmake_moose_cpack.cmake
10-
cmake_uninstall.cmake.in
1+
include AUTHORS
2+
include CMakeLists.txt
3+
include CONTRIBUTING.md
4+
include CheckCXXCompiler.cmake
5+
include INSTALL.md
6+
include LICENSE
7+
include MANIFEST.in
8+
include README.md
9+
include cmake_moose_cpack.cmake
10+
include cmake_uninstall.cmake.in
1111
recursive-include basecode *
1212
recursive-include benchmarks *
1313
recursive-include biophysics *

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# - Update setuptools using `python2 -m pip install setuptools --upgrade --user'.
1414

1515
__author__ = "Dilawar Singh"
16+
1617
__copyright__ = "Copyright 2019-, Dilawar Singh"
1718
__maintainer__ = "Dilawar Singh"
1819
__email__ = "dilawar.s.rajput@gmail.com"
@@ -53,7 +54,7 @@
5354
pass
5455

5556

56-
version_ = '3.2.%s.rc1' % stamp
57+
version_ = '3.2.1.dev%s' % stamp
5758

5859
# importlib is available only for python3. Since we build wheels, prefer .so
5960
# extension. This way a wheel built by any python3.x will work with any python3.
@@ -112,7 +113,7 @@ def finalize_options(self):
112113
# super().finalize_options()
113114
_build_ext.finalize_options(self)
114115
self.cmake_options['PYTHON_EXECUTABLE'] = os.path.realpath(sys.executable)
115-
self.cmake_options['MOOSE_VERSION'] = version_
116+
self.cmake_options['VERSION_MOOSE'] = version_
116117
if self.with_boost:
117118
self.cmake_options['WITH_BOOST'] = 'ON'
118119
self.cmake_options['WITH_GSL'] = 'OFF'

0 commit comments

Comments
 (0)