here is the patch to setup.py to use the INCLUDE environment variable if set, and otherwise use your old preset values:
Code:
@@ -412,11 +412,16 @@
)
]
if iswindows:
+ sEnvInclude = os.environ.get('INCLUDE')
+ if sEnvInclude is None :
+ linclude_dirs=['C:/WinDDK/6001.18001/inc/api/',
+ 'C:/WinDDK/6001.18001/inc/crt/']
+ else:
+ linclude_dirs = sEnvInclude.split(';')
ext_modules.append(Extension('calibre.plugins.winutil',
sources=['src/calibre/utils/windows/winutil.c'],
libraries=['shell32', 'setupapi'],
- include_dirs=['C:/WinDDK/6001.18001/inc/api/',
- 'C:/WinDDK/6001.18001/inc/crt/'],
+ include_dirs=linclude_dirs,
extra_compile_args=['/X']
))
if isosx:
Please feel free to recode more elegantly (which I am sure is possible).