File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11import sys
22import os .path
33import codecs
4+ import platform
45from setuptools import setup , Extension
56from setuptools .command .build_ext import build_ext
67
78
9+ IS_WINDOWS = platform .system () == "Windows"
10+
11+
812# Obscure magic required to allow numpy be used as a 'setup_requires'.
913# Based on https://stackoverflow.com/questions/19919905
1014class local_build_ext (build_ext ):
@@ -34,10 +38,19 @@ def finalize_options(self):
3438 os .path .join (libdir , f ) for f in tsk_source_files ] + [
3539 os .path .join (kastore_dir , "kastore.c" )]
3640
41+ defines = []
42+ libraries = []
43+ if IS_WINDOWS :
44+ # Needed for generating UUIDs
45+ libraries .append ("Advapi32" )
46+ defines .append (("WIN32" , None ))
47+
3748_tskit_module = Extension (
3849 '_tskit' ,
3950 sources = sources ,
4051 extra_compile_args = ["-std=c99" ],
52+ libraries = libraries ,
53+ define_macros = defines ,
4154 # Enable asserts
4255 undef_macros = ["NDEBUG" ],
4356 include_dirs = [libdir , kastore_dir ],
Original file line number Diff line number Diff line change 11# Definitive location for the version number.
2- tskit_version = "0.1.0a1 "
2+ tskit_version = "0.1.0a2 "
You can’t perform that action at this time.
0 commit comments