Skip to content

Commit

Permalink
Discriminate between platforms when setting compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
zv committed Feb 13, 2019
1 parent d74f0f5 commit cf1ecd2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python
import os
import sys

from distutils.core import setup, Extension
sources = [
'src/python/core.c',
Expand Down Expand Up @@ -28,10 +30,22 @@
'src/libethash/sha3.h',
'src/libethash/util.h',
]

WIN32 = sys.platform.startswith("win")

ccargs=[
"/Isrc/",
"/Wall"
] if WIN32 else [
"-Isrc/",
"-std=gnu99",
"-Wall"
]

pyethash = Extension('pyethash',
sources=sources,
depends=depends,
extra_compile_args=["-Isrc/", "-std=gnu99", "-Wall"])
extra_compile_args=ccargs)

setup(
name='pyethash',
Expand Down

0 comments on commit cf1ecd2

Please sign in to comment.