setup.py 1.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python

# Copyright 2017-2020, Schlumberger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Build and install the C++ part of the ZGZ accessor.

Usage: python setup.py bdist_wheel

NOTE: Other distribution types such as a source distribution
are not supported and might not work correctly.
"""

from setuptools import setup, Extension
import os

version = "0.2." + os.getenv("AZURE_BUILDID", "unknown")

module1 = Extension('sdglue',
                    libraries = ['sdapi' ],
                    sources = ['sdgluemodule.cpp'],
                    include_dirs = ['../../build/temp/Seismic-Drive/include'],
                    library_dirs = ['../../build/temp/Seismic-Drive/lib/linux64'],
36
                    runtime_library_dirs = ['$ORIGIN/sdapilibs'],
37
38
39
40
41
42
43
44
45
                    extra_compile_args = ['-fopenmp', '-std=c++11', '-O2'],
                    extra_link_args = ['-fopenmp', '-Wl,-z,origin'])

setup (name = 'SdGlue',
       license='Apache',
       classifiers=[
           "Programming Language :: C++ :: 11",
           "License :: OSI Approved :: Apache Software License",
       ],
46
47
48
       packages     = ['sdapilibs'],
       package_dir  = {'sdapilibs': '../../build/temp/Seismic-Drive/lib/linux64'},
       package_data = {'sdapilibs': ['libsdapi.so*']},
49
50
51
52
53
       version = version,
       description = 'Python wrapper for C++ SDAPI',
       #author='',
       #author_email='',
       ext_modules = [module1])