source: orange/install-scripts/addon-pack/prepare-and-pack.py @ 10581:94a831b04ec3

Revision 10581:94a831b04ec3, 583 bytes checked in by markotoplak, 2 years ago (diff)

Moved some other scripts from misc to utils and Orange imports and canvas not works, although not systematically tested.

  • Property exe set to *
Line 
1#!/usr/bin/python
2
3import sys
4sys.path += ["/root/orange"]
5
6import Orange.utils.addons
7rao = Orange.utils.addons.OrangeRegisteredAddOn(None, sys.argv[1])
8rao.prepare(None, None, None, None, None, None, None, None, None, None)
9
10import zipfile, os
11oao = zipfile.ZipFile(sys.argv[2], 'w')
12dirs = os.walk(".")
13for (dir, subdirs, files) in dirs:
14    for file in files:
15        fileRelPath = os.path.join(dir, file)
16        if fileRelPath.startswith("source/") or fileRelPath.startswith(".svn/") or "/.svn/" in fileRelPath:
17            continue
18        oao.write(fileRelPath, fileRelPath)
Note: See TracBrowser for help on using the repository browser.