diff --git a/setup.py b/setup.py index 0560cd36..1f643ea2 100755 --- a/setup.py +++ b/setup.py @@ -2,10 +2,7 @@ import os import sys -from setuptools import setup, Extension - -WIN32 = sys.platform.startswith("win") - +from distutils.core import setup, Extension sources = [ 'src/python/core.c', 'src/libethash/io.c', @@ -34,6 +31,7 @@ 'src/libethash/util.h', ] +WIN32 = sys.platform.startswith("win") ccargs=[ "/Isrc/", @@ -44,13 +42,10 @@ "-Wall" ] -ldargs=["shell32.lib"] if WIN32 else [] - pyethash = Extension('pyethash', sources=sources, depends=depends, - extra_compile_args=ccargs, - extra_link_args=ldargs) + extra_compile_args=ccargs) setup( name='pyethash', diff --git a/src/libethash/mmap_win32.c b/src/libethash/mmap_win32.c index 42968b98..f5cbb333 100644 --- a/src/libethash/mmap_win32.c +++ b/src/libethash/mmap_win32.c @@ -11,6 +11,8 @@ * UnmapViewOfFile: http://msdn.microsoft.com/en-us/library/aa366882(VS.85).aspx */ +#pragma comment(lib, "Shell32.lib") + #include #include #include "mmap.h"