def dump(data): if not CACHE_DUMP: return if not os.path.exists(CACHE_PATH): os.mkdir(CACHE_PATH) if data['cachable']: h = hashlib.sha1() with open(data['file_path']) as f: h.update(f.read()) for i in data['includes']['paths']: with open(i) as f: h.update(f.read()) data['sha'] = h.hexdigest() data['version'] = getVersion() # curdir = <dsn>/script del data['preprocessed'] del data['cachable'] file = cache_path(data['file_path']) yaml.dump(data, open(file, 'w'))
self.cwd = os.getcwd() def run(self): progressBar.run() shutdownLogServer() progressBar.stop() def getDataTree(iPath): res = [] for root, dirs, files in os.walk(iPath): for f in files: res.append(os.path.join(root,f).replace('autohdl/', '')) return res setup(name = 'AutoHDL', version = pkg_info.getVersion(), description = 'Automatization Utilities', author = 'Max Golohov', author_email = '*****@*****.**', platforms = ['win32'], packages = ['autohdl', 'autohdl.programmator', 'autohdl.verilog', 'autohdl.lib', 'autohdl.lib.yaml', 'autohdl.lib.tinydav'], package_data = {'autohdl': ['data/*']+getDataTree('autohdl/doc')+['lib/djtgcfg.exe']}, # + getDataTree('autohdl/test/fake_repo_gold') + getDataTree('autohdl/test/fake_repo')}, data_files = [('', ['autohdl/hdl.py'])], cmdclass = {'uninstall': Uninstall, 'shutdownlog': ShutdownLogServer}, )
def versionOK(data): if data.get('version') == getVersion(): return True