Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #558 from emthompson-usgs/win
Browse files Browse the repository at this point in the history
Apply winpi.patch
  • Loading branch information
emthompson-usgs authored Dec 18, 2020
2 parents f02a5c2 + 881bea5 commit 9630996
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions gmprocess/metrics/cfuncs.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define _USE_MATH_DEFINES
#include <math.h>
#include "cfuncs.h"

Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# from distutils.core import setup
import os
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
Expand All @@ -12,16 +12,20 @@
ko_sourcefiles = ["gmprocess/waveform_processing/smoothing/konno_ohmachi.pyx",
"gmprocess/waveform_processing/smoothing/smoothing.c"]

libraries = []
if os.name == 'posix':
libraries.append('m')

ext_modules = [
Extension(
"gmprocess.metrics.oscillators",
sourcefiles,
libraries=["m"],
libraries=libraries,
include_dirs=[numpy.get_include()]),
Extension(
"gmprocess.waveform_processing.smoothing.konno_ohmachi",
ko_sourcefiles,
libraries=["m"],
libraries=libraries,
include_dirs=[numpy.get_include()])
]

Expand Down

0 comments on commit 9630996

Please sign in to comment.