source: orange-bioinformatics/post_install_script.py @ 812:087df3c8dfb9

Revision 812:087df3c8dfb9, 877 bytes checked in by ales_erjavec <ales.erjavec@…>, 5 years ago (diff)
  • added update_by_tags call
Line 
1import distutils
2import distutils.sysconfig
3import sys
4import os
5
6if len(sys.argv) <= 1 or len(sys.argv) > 1 and "remove" not in sys.argv[1]:
7    try:
8        print "Downloading essential genomics databases"
9        if sys.platform == "win32":
10            os.system("start " + sys.prefix+"""\\python.exe -c "import orngServerFiles; orngServerFiles.update_by_tags(tags=['essential'])" """)
11        else:
12            import orngServerFiles
13            orngServerFiles.update_by_tags(tags=["essential"])
14    except Exception, ex:
15        print ex
16        pass
17
18    print "To download and/or update the databases needed by Orange"
19    print "Bioinformatics please use the \"Update Genomics Databases\""
20    print "widget in Orange Canvas or use the orngServerFiles module:"
21    print
22    print "    import orngServerFiles"
23    print "    orgnServerFiles.consoleupdate()"
24    print
Note: See TracBrowser for help on using the repository browser.