Commit 58db1b0f authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

installation python script

parent 8ab77613
#!/usr/bin/env python
"""
To build RPM :
python3 setup.py bdist_rpm --release 1mga6
To build deb package
python3 setup.py --command-packages=stdeb.command bdist_deb sdist_dsc --with-python2=True --with-python3=True --dist-dir=my_deb --debian-version 0ubuntu16.04
"""
#from distutils.core import setup, Extension
import numpy,os,sys
from setuptools import setup, Extension
# find out numpy include directory.
try:
numpy_include = numpy.get_include()
except AttributeError:
numpy_include = numpy.get_numpy_include()
# detect python version (2 or 3)
pyversion="3"
if sys.version_info[0]<3 :
pyversion=""
setup(
name='python'+pyversion+'-unsio',
version='1.0',
description='Python wrapper to unsio',
author='Jean-Charles LAMBERT',
author_email='jean-charles.lambert@lam.fr',
url='https://projets.lam.fr/projects/unsio',
# 'unsio' -> installation directory
# 'swig' -> about all the py source in 'src'
package_dir={'unsio':'py/swig'},
packages=['unsio'],
ext_modules = [
Extension("unsio/_py_unsio",
sources=[ "py/swig/py_unsio.i"],
swig_opts=['-c++','-modern', '-Isrc','-I./py/swig', '-Iswig'],
include_dirs = [numpy_include,'src'],
libraries=['unsio'],
library_dirs=['/usr/lib64','/lib64'],
runtime_library_dirs=['/usr/lib64','/lib64']
#library_dirs=[os.environ['NEMOLIB']],
#runtime_library_dirs=[os.environ['NEMOLIB']]
)
],
install_requires=['numpy'],
setup_requires=['numpy']
#
#py_modules = ["py_baryc"]
#data_files=[('',['src/numpy.i'])]
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment