source: sasview/guiframe/setup.py @ 32c0841

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

working on pylint

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