source: sasview/guiframe/setup.py @ e6a93df

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 e6a93df was ae83ad3, checked in by Gervaise Alina <gervyh@…>, 14 years ago

working on 1D\2D toggle

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