Skip to content
Snippets Groups Projects
Commit 6e00bd7a authored by Wolfgang Ludwig's avatar Wolfgang Ludwig
Browse files

fixes for the installation package to work with python 3

parent 6bb13683
No related branches found
No related tags found
No related merge requests found
......@@ -6,18 +6,13 @@ Created on Feb 4, 2013
import os
import zipfile
import glob
class DCTMakeInstallBundle(object):
install_bundle_files = ('dct_compile_matlab_functions.py', \
'dct_compile_mex_functions.py', \
'dct_io_xml.py', \
'dct_utils_git.py', \
'dct_utils_platform.py', \
'dct_matlab_invocation.py', \
'dct_batch.py', \
'dct_notification.py', \
'dct_setup.py', \
support_files = ('zUtil_Python/dct_*.py', \
'zUtil_Python/__init__.py')
install_bundle_files = ('zUtil_Python/dct_setup.py', \
'README.txt')
def __init__(self, *args, **kwargs):
......@@ -25,16 +20,19 @@ class DCTMakeInstallBundle(object):
def run(self, dct_dir, destFile = ""):
currentDir = os.getcwd()
os.chdir(os.path.join(dct_dir, "zUtil_Python"))
os.chdir(dct_dir)
if destFile is "":
destFile = os.path.join(currentDir, "dct-install.zip")
zfid = zipfile.ZipFile(destFile, mode = "w")
try:
with zipfile.ZipFile(destFile, mode = "w") as zfid:
for f in DCTMakeInstallBundle.install_bundle_files:
zfid.write(f, os.path.join("dct-install", f))
finally:
zfid.close()
n = os.path.join('dct-install', os.path.basename(f))
zfid.write(f, arcname=n)
for f_base in DCTMakeInstallBundle.support_files:
fs = glob.glob(f_base)
for f in fs:
n = os.path.join('dct-install', 'dct', os.path.basename(f))
zfid.write(f, arcname=n)
print("Created file: %s" % destFile)
os.chdir(currentDir)
......@@ -6,12 +6,12 @@ Created on Jan 30, 2013
import sys
import dct_utils_platform
import dct_utils_git
from dct import dct_utils_platform
from dct import dct_utils_git
from dct_io_xml import DCTOutput, DCTConfUpdater, DCTConf
from dct_compile_mex_functions import MexBuilder
from dct_compile_matlab_functions import FunctionsBuilder
from dct.dct_io_xml import DCTOutput, DCTConfUpdater, DCTConf
from dct.dct_compile_mex_functions import MexBuilder
from dct.dct_compile_matlab_functions import FunctionsBuilder
class DCTSetup(object):
......@@ -240,8 +240,7 @@ if __name__ == '__main__':
matlab_path = dct_sup.matlab_dir, \
mfiles_to_consider = [], \
force_compile = True)
func_builder.generateMfile()
func_builder.compile_mex_files()
func_builder.buildMatlabFunctions()
dct_sup.out.printJob("Done.")
print("")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment