Permalink
Browse files

Patched setup.py, pyxf.py and win32prng.c to build on Windows

  • Loading branch information...
Markus Schatten
Markus Schatten committed Dec 20, 2013
1 parent 9cb7492 commit eabe80784c474499556b0e8498fd0ddd3382fc71
Showing with 12 additions and 8 deletions.
  1. +8 −5 setup.py
  2. +3 −3 spade/pyxf.py
  3. +1 −0 tlslite/utils/win32prng.c
View
13 setup.py 100644 → 100755
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import sys
+import subprocess
#from distutils.core import setup, Extension
from setuptools import setup, Extension
import glob
@@ -26,6 +27,12 @@
with open('README') as file:
long_description = file.read()
+deps = [
+ "SPARQLWrapper",
+ "unittest-xml-reporting"]
+if subprocess.mswindows:
+ deps.append( 'pywin32' )
+
setup(name='SPADE',
version=__version__,
license="LGPL",
@@ -52,11 +59,7 @@
'Topic :: Adaptive Technologies',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
- install_requires = [
- "pexpect",
- "SPARQLWrapper",
- "unittest-xml-reporting",
- ],
+ install_requires = deps
)
View
@@ -658,7 +658,7 @@ def load(self, module, into=None):
self.engine.sendline("['" + module + "'>>'" + into + "'].")
else:
self.engine.sendline("['" + module + "'].")
- res = self.engine.get(t=.2)
+ res = self.engine.get(t=.5)
if flora2error.findall(res) != []:
raise Flora2CompileError('Error while compiling module "' + module + '". Error from Flora2:\n' + res)
@@ -683,7 +683,7 @@ def query(self, query):
lvars = list(set(lvars))
if lvars == []: # yes/no query (no variables)
self.engine.sendline(query)
- res = self.engine.get(t=.2)
+ res = self.engine.get(t=.2, tr=10)
if flora2error.findall(res) != []:
raise Flora2QueryError('Error while executing query "' + query + '". Error from Flora2:\n' + res)
else:
@@ -693,7 +693,7 @@ def query(self, query):
return False
else: # normal query
self.engine.sendline(query)
- res = self.engine.get(t=.2)
+ res = self.engine.get(t=.2, tr=10)
if flora2error.findall(res) != []:
raise Flora2QueryError('Error while executing query "' + query + '". Error from Flora2:\n' + res)
else:
View
1 tlslite/utils/win32prng.c 100644 → 100755
@@ -2,6 +2,7 @@
#include "Python.h"
#define _WIN32_WINNT 0x0400 /* Needed for CryptoAPI on some systems */
#include <windows.h>
+#include <wincrypt.h>
static PyObject* getRandomBytes(PyObject *self, PyObject *args)

0 comments on commit eabe807

Please sign in to comment.