source: sasview/guiframe/setup.py @ dec793e

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since dec793e was 02775ab8, checked in by Gervaise Alina <gervyh@…>, 14 years ago

remove unused code

  • Property mode set to 100644
File size: 1.7 KB
Line 
1"""
2    Installs the guiframe package
3"""
4
5   
6from distutils.core import setup, Extension
7
8from distutils.sysconfig import get_python_lib
9import os
10import sys
11
12   
13path = os.path.join(os.getcwd(), 'local_perspectives')
14package_dir = { "sans.guiframe":".",
15                "sans.guiframe.local_perspectives":"local_perspectives",
16                "sans.guiframe.widgets":"widgets"}
17packages = ["sans.guiframe", 
18            "sans.guiframe.local_perspectives",
19            "sans.guiframe.widgets"]
20# build local plugin
21for dir in os.listdir(path):
22    if dir not in ['.svn','__init__.py', '__init__.pyc']:
23        package_name = "sans.guiframe.local_perspectives." + dir
24        packages.append(package_name)
25        package_dir[package_name] = "local_perspectives/" + dir
26               
27# Check whether the sans module exists,
28# if not, make sure a default __init__ is created
29if 'install' in sys.argv:
30    try:
31        lib_dir = get_python_lib()
32        danse_init = os.path.join(lib_dir, 'sans', '__init__.py')
33        if not os.path.isfile(danse_init):
34            if not os.path.isdir("tmp_sans"):
35                os.mkdir("tmp_sans")
36            f = open("tmp_sans/__init__.py",'w')
37            f.close()
38            package_dir['sans'] = "tmp_sans"
39            packages.append("sans")
40    except:
41        print "Couldn't create sans/__init__.py\n  %s" % sys.exc_value
42
43setup(
44    name="guiframe",
45    version = "0.1",
46    description = "Python module for SANS gui framework",
47    author = "University of Tennessee",
48    url = "http://danse.chem.utk.edu",
49   
50    package_dir = package_dir,
51
52    packages = packages,
53   
54    package_data={"sans.guiframe": ['images/*']},
55    )
56       
Note: See TracBrowser for help on using the repository browser.