calibre now builds fully on windows

The duktape tests are crashing have to figure out why at some point
This commit is contained in:
Kovid Goyal 2019-06-19 17:48:41 +05:30
parent aed78ba857
commit 2635e23ed5
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 11 additions and 4 deletions

View File

@ -94,6 +94,9 @@ PYQT_MODULES = (
)
del dlls
if iswindows:
PYQT_MODULES += ('QtWinExtras',)
def read_cal_file(name):
with open(os.path.join(CALIBRE_DIR, 'src', 'calibre', name), 'rb') as f:

View File

@ -142,7 +142,9 @@ class BuildTest(unittest.TestCase):
winutil = plugins['winutil'][0]
def au(x, name):
self.assertTrue(isinstance(x, unicode_type), name + '() did not return a unicode string')
self.assertTrue(
isinstance(x, unicode_type),
'%s() did not return a unicode string, instead returning: %r' % (name, x))
for x in winutil.argv():
au(x, 'argv')
for x in 'username temp_path locale_name'.split():
@ -152,12 +154,14 @@ class BuildTest(unittest.TestCase):
au(d['decimal_point'], 'localeconv')
for k, v in iteritems(d):
au(v, k)
for k in os.environ:
au(getenv(k), 'getenv-' + k)
os.environ['XXXTEST'] = 'YYY'
self.assertEqual(getenv('XXXTEST'), 'YYY')
del os.environ['XXXTEST']
self.assertIsNone(getenv('XXXTEST'))
for k in os.environ:
v = getenv(k)
if v is not None:
au(v, 'getenv-' + k)
t = time.localtime()
fmt = '%Y%a%b%e%H%M'
for fmt in (fmt, fmt.encode('ascii')):
@ -311,8 +315,8 @@ class BuildTest(unittest.TestCase):
def find_tests():
ans = unittest.defaultTestLoader.loadTestsFromTestCase(BuildTest)
from calibre.utils.icu_test import find_tests
import duktape.tests as dtests
ans.addTests(find_tests())
import duktape.tests as dtests
ans.addTests(unittest.defaultTestLoader.loadTestsFromModule(dtests))
from tinycss.tests.main import find_tests
ans.addTests(find_tests())