Commit 45e64103 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

update wheels

parent 15446f79
include py/swig/numpy.i include py/swig/numpy.i
include src/uns.h src/snapshotinterface.h src/componentrange.h src/userselection.h src/snapshotinterface.h src/ctools.h src/version.h include src/uns.h src/snapshotinterface.h src/componentrange.h src/userselection.h src/snapshotinterface.h src/ctools.h src/version.h
include py/test/test_py_unsio.py
exclude py/swig/py_unsio.py exclude py/swig/py_unsio.py
#!/usr/bin/env python
"""
To build RPM (from py respositoy) :
SRCPATH=`pwd`/../src python3 setup.py bdist_rpm
To build deb package
SRCPATH=`pwd`/../src python3 setup.py --command-packages=stdeb.command bdist_deb
"""
#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()
try:
SRCPATH=os.environ["SRCPATH"]
except:
print("You must prepend your command line with \"SRCPATH=`pwd`/../src\"")
sys.exit()
# 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':'swig'},
packages=['unsio'],
# swig dependencies
ext_modules = [
Extension("unsio/_py_unsio",
sources=[ "swig/py_unsio.i"],
swig_opts=['-c++','-modern', '-I'+SRCPATH,'-I'+SRCPATH+'/../py/swig', '-Iswig'],
include_dirs = [numpy_include,SRCPATH],
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'])]
)
...@@ -12,10 +12,13 @@ import numpy as np # arrays are treated as numpy arrays ...@@ -12,10 +12,13 @@ import numpy as np # arrays are treated as numpy arrays
import os.path import os.path
#dirname, filename = os.path.split(os.path.abspath(__file__)) #dirname, filename = os.path.split(os.path.abspath(__file__))
#sys.path.append(dirname+'../modules/') # trick to find modules directory #sys.path.append(dirname+'../modules/') # trick to find modules directory
from py_unsio import * from unsio import *
import copy import copy
import tempfile import tempfile
from IPython import embed try:
from IPython import embed
except:
pass
class snap: class snap:
time = None time = None
......
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