Changeset 592cb156 in sasview


Ignore:
Timestamp:
Jan 10, 2012 1:16:21 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
62dc94b
Parents:
70ec588d
Message:

Fix sansmodels as standalone package

Files:
1 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/setup.py

    r503a972 r592cb156  
    1212from distutils.core import Extension, setup 
    1313from distutils.command.build_ext import build_ext 
     14 
     15# Manage version number ###################################### 
     16sys.path.append(os.path.join("src", "sans")) 
     17import models 
     18VERSION = models.__version__ 
     19print "Building models v%s" % VERSION 
     20############################################################## 
    1421 
    1522# Options to enable OpenMP 
     
    5360smear_dir  = os.path.join("src", "c_smearer") 
    5461wrapper_dir  = os.path.join("src", "python_wrapper", "generated") 
    55 print "Installing SANS models" 
     62if not os.path.isdir(wrapper_dir): 
     63    os.makedirs(wrapper_dir) 
    5664 
    5765sys.path.append(os.path.join("src", "python_wrapper")) 
     
    101109dist = setup( 
    102110    name="sansmodels", 
    103     version = "1.0.0", 
     111    version = VERSION, 
    104112    description = "Python module for SANS scattering models", 
    105113    author = "SANS/DANSE", 
    106114    author_email = "sansdanse@gmail.gov", 
    107     url = "http://danse.us/trac/sans", 
     115    url = "http://sansviewproject.svn.sourceforge.net", 
    108116     
    109117    # Place this module under the sans package 
     
    113121    package_dir = {"sans":os.path.join("src", "sans"), 
    114122                   "sans.models":os.path.join("src", "sans", "models"), 
    115                    "sans.models.sans_extension":includedir, 
     123                   "sans.models.sans_extension":os.path.join("src", "sans", "models", "sans_extension"), 
    116124                  }, 
    117125    package_data={'sans.models': [os.path.join('media', "*")]}, 
  • sansmodels/src/sans/models/__init__.py

    r0abf7bf r592cb156  
    22    1D Modeling for SANS 
    33""" 
    4 ## \mainpage Analytical Modeling for SANS 
    5 # 
    6 # \section intro_sec Introduction 
    7 # This module provides theoretical models for the scattering  
    8 # intensity for SANS.  
    9 # 
    10 # Documentation can be found here:  
    11 #    http://danse.us/trac/sans/wiki/8_2_2_1DModelFitting 
    12 #    http://danse.us/trac/sans/wiki/8_2_3_2DModeling 
    13 # 
    14 # \section install_sec Installation 
    15 # 
    16 # \subsection obtain Obtaining the Code 
    17 # 
    18 # The code is available here: 
    19 # \verbatim 
    20 #$ svn co svn://danse.us/sans/sansmodels 
    21 # \endverbatim 
    22 # 
    23 # \subsection depends External Dependencies 
    24 # None 
    25 # 
    26 # \subsection build Building the code 
    27 # The standard python package can be built with distutils. 
    28 # \verbatim 
    29 #$ python setup.py build 
    30 #$ python setup.py install 
    31 # \endverbatim 
    32 # 
    33 # \section overview_sec Package Overview 
    34 #  
    35 # \subsection class Class Diagram: 
    36 # \image html class_diag.png 
    37 # Note that the CCylinderModel is written as C code.  
    38 # CylinderModel acts as an adaptor class for the C extension. 
    39 # Most model classes will be written that way. 
    40 # 
    41 # \subsection behav Behavior enumeration for pyre-level architecture: 
    42 # \image html behavior_pyre.png 
    43 # 
    44 # \subsection behav Behavior enumeration for under-lying architecture: 
    45 # \image html behavior.jpg 
    46 # 
    47 # \subsection Tutorial 
    48 # To create a model: 
    49 # \verbatim 
    50 #from sans.models.CylinderModel import CylinderModel 
    51 #    cyl = CylinderModel() 
    52 # \endverbatim 
    53 # 
    54 # To evaluate a model (at x=0.1 in this example): 
    55 # \verbatim 
    56 #    output = cyl.run(0.1) 
    57 # \endverbatim 
    58 # 
    59 # To change a parameter: 
    60 # \verbatim 
    61 #    cyl.setParam('scale', 0.1) 
    62 # \endverbatim 
    63 # 
    64 # To get the value of a parameter: 
    65 # \verbatim 
    66 #    cyl.getParam('scale') 
    67 # \endverbatim 
    68 # 
    69 # Other examples are available as unit tests under sans.models.test. 
    70 # 
    71 # \section help_sec Contact Info 
    72 # Code and Documentation by Mathieu Doucet as part of the DANSE project. 
    73 #PLUGIN_ID = "models plug-in 0.4" 
    74 from sans.models import * 
     4#from sans.models import * 
    755 
    766import os 
    777from distutils.filelist import findall 
     8 
     9__version__ = "1.1.0" 
    7810 
    7911def get_data_path(media): 
  • setup.py

    r503a972 r592cb156  
    263263package_dir["sans"] = os.path.join("sansmodels", "src", "sans") 
    264264package_dir["sans.models"] = os.path.join("sansmodels", "src", "sans", "models") 
    265 package_dir["sans.models.sans_extension"] = includedir 
     265package_dir["sans.models.sans_extension"] = os.path.join("sansmodels", "src", "sans", "models", "sans_extension") 
    266266             
    267267package_data['sans.models'] = [os.path.join('media', "*")] 
Note: See TracChangeset for help on using the changeset viewer.