File tree 8 files changed +54
-5
lines changed
8 files changed +54
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,21 @@ sudo make install
33
33
34
34
The libmsym module requires python 3.
35
35
36
+ If you have installed the libmsym library in a location that can be found by your loader (e.g. ldconfig):
37
+ ``` shell
38
+ cd ../bindings/python
39
+ # install libmsym module in user site
40
+ python setup.py install --user
41
+ # run example
42
+ python ./examples/msympy_example.py < input xyz-file> < output xyz-file>
43
+ ```
44
+
45
+ If you want to install libmsym in a custom directory, the easies way it to use cmake:
36
46
``` shell
37
47
# install libmsym shared library in $HOME/lib and the python module in the user site
38
- cmake -DMSYM_BUILD_PYTHON:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_INSTALL_PREFIX=$HOME /lib -DMSYM_PYTHON_INSTALL_OPTS=--user ../.
48
+ cmake -DMSYM_BUILD_PYTHON:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_INSTALL_PREFIX=$HOME /lib -DMSYM_PYTHON_INSTALL_OPTS=--user ../.
39
49
# run example
40
- python3 ../bindings/python/examples/msympy_example.py < input xyz-file> < output xyz-file>
50
+ python ../bindings/python/examples/msympy_example.py < input xyz-file> < output xyz-file>
41
51
```
42
52
43
53
methods dealing with SALCs etc. require numpy to be installed
Original file line number Diff line number Diff line change 1
1
/build
2
- /__pycache__
3
2
4
3
* .swp
5
4
.DS_Store
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ cmake_minimum_required (VERSION 2.8.11)
3
3
find_program (PYTHON "python" )
4
4
if (PYTHON)
5
5
set (MSYM_PYTHON_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR} /libmsym" )
6
- set (MSYM_PYTHON_SETUP_IN "${CMAKE_CURRENT_SOURCE_DIR} /setup.py.in" )
7
- set (MSYM_PYTHON_INIT_C_IN "${CMAKE_CURRENT_SOURCE_DIR} /libmsym /__init__.py.in" )
6
+ set (MSYM_PYTHON_SETUP_IN "${CMAKE_CURRENT_SOURCE_DIR} /cmake/ setup.py.in" )
7
+ set (MSYM_PYTHON_INIT_C_IN "${CMAKE_CURRENT_SOURCE_DIR} /cmake /__init__.py.in" )
8
8
set (MSYM_PYTHON_CODE_IN "${CMAKE_CURRENT_SOURCE_DIR} /libmsym/libmsym.py" )
9
9
set (MSYM_PYTHON_SETUP "${CMAKE_CURRENT_BINARY_DIR} /setup.py" )
10
10
set (MSYM_PYTHON_INIT_G_IN "${CMAKE_CURRENT_BINARY_DIR} /__init__.py.in" )
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ /__pycache__
2
+
3
+ * .swp
4
+ .DS_Store
Original file line number Diff line number Diff line change
1
+ __all__ = []
2
+
3
+ _libmsym_install_location = None
4
+
5
+ def export (defn ):
6
+ globals ()[defn .__name__ ] = defn
7
+ __all__ .append (defn .__name__ )
8
+ return defn
9
+
10
+ from . import libmsym
11
+
Original file line number Diff line number Diff line change
1
+ #
2
+ # setup.py
3
+ # libmsym
4
+ #
5
+ # Created by Marcus Johansson on 07/10/15.
6
+ # Copyright (c) 2015 Marcus Johansson.
7
+ #
8
+ # Distributed under the MIT License ( See LICENSE file or copy at http://opensource.org/licenses/MIT )
9
+ #
10
+
11
+ from distutils .core import setup
12
+ import sys
13
+
14
+ if (not sys .version_info [0 ] is 3 ):
15
+ sys .exit ('libmsym module requires python 3' )
16
+
17
+ setup (name = 'libmsym' ,
18
+ version = '${LIBMSYM_VERSION}' ,
19
+ description = 'libmsym python binding' ,
20
+ license = 'MIT' ,
21
+ author = 'Marcus Johansson' ,
22
+
23
+ url = 'https://github.com/mcodev31/libmsym' ,
24
+ packages = ['libmsym' ]
25
+ )
You can’t perform that action at this time.
0 commit comments