Changeset 1443


Ignore:
Timestamp:
Oct 15, 2013 8:22:10 PM (9 years ago)
Author:
jemian
Message:

figured out how to create and install starter scripts using setup.py

Location:
bcdaqwidgets/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • bcdaqwidgets/trunk/setup.py

    r1395 r1443  
    3131        version=bcdaqwidgets.__version__,
    3232        description=bcdaqwidgets.__description__,
     33        long_description = bcdaqwidgets.__long_description__,
    3334        author=', '.join(bcdaqwidgets.__authors__),
    3435        author_email=bcdaqwidgets.__author_email__,
    3536        url=bcdaqwidgets.__url__,
    36         packages=bcdaqwidgets.__all__,
     37        packages=['bcdaqwidgets', 'bcdaqwidgets_demos', ],
    3738        license = bcdaqwidgets.__license__,
    38         long_description = bcdaqwidgets.__long_description__,
    3939        package_dir={
    40                      'bcdaqwidgets':  os.path.join('src', 'bcdaqwidgets'),
    41                      },
    42         copyright = bcdaqwidgets.__copyright__,
     40            'bcdaqwidgets':        os.path.join('src', 'bcdaqwidgets'),
     41            'bcdaqwidgets_demos':  os.path.join('src', 'bcdaqwidgets_demos'),
     42        },
    4343        platforms='any',
    4444        zip_safe=False,
     
    5656            'Topic :: Utilities',
    5757        ],
     58      entry_points={
     59          # create & install launchers in <python>/bin
     60          'console_scripts':[
     61              'pvview = bcdaqwidgets_demos.pvview:main',
     62              'pyside_probe = bcdaqwidgets_demos.pyside_probe:main',
     63          ]
     64      },
    5865     )
  • bcdaqwidgets/trunk/src/bcdaqwidgets/__init__.py

    r1425 r1443  
    1 
    2 
    3 ########### SVN repository information ###################
    4 # $Date$
    5 # $Author$
    6 # $Revision$
    7 # $URL$
    8 # $Id$
    9 ########### SVN repository information ###################
    10 
    111import datetime
    122import bcdaqwidgets
     
    2414__project__     = u'BcdaQWidgets'
    2515__description__ = u"PyEpics-aware PySide widgets for the APS."
    26 __copyright__   = u'2013, Argonne National Laboratory'
     16__copyright__   = u'2009-2013, UChicago Argonne, LLC'
    2717__authors__     = [u'Pete Jemian', u'Cayla Suarez']
    2818__institution__ = u"Advanced Photon Source, Argonne National Laboratory"
    2919__author_email__= u"jemian@anl.gov"
    3020__url__         = u"will be but not yet: http://subversion.xray.aps.anl.gov/admin_bcdaext/BcdaQWidgets"
    31 __license__     = u"(c) 2009-2013, UChicago Argonne, LLC"
     21__license__     = u"(c) " + __copyright__
    3222__license__     += u" (see LICENSE file for details)"
    3323
     
    4232__full_version__  = u"v%s.%s, %s" % (__version__, __minor_version__, __yyyymmdd__)
    4333__all__ = ['bcdaqwidgets', ]
     34
     35
     36########### SVN repository information ###################
     37# $Date$
     38# $Author$
     39# $Revision$
     40# $URL$
     41# $Id$
     42########### SVN repository information ###################
  • bcdaqwidgets/trunk/src/bcdaqwidgets_demos/pvview.py

    r1440 r1443  
    77from PySide.QtGui import QWidget, QLabel, QGridLayout, QApplication
    88
    9 sys.path.insert(0, os.path.abspath('..'))
     9#sys.path.insert(0, os.path.abspath('..'))
    1010import bcdaqwidgets
    1111
     
    4848        self.grid.addWidget(widget, row, 1)
    4949
    50 if __name__ == '__main__':
     50
     51def main():
    5152    app = QApplication(sys.argv)
    5253    probe = PVView()
     
    5960
    6061
     62if __name__ == '__main__':
     63    main()
     64
     65
    6166########### SVN repository information ###################
    6267# $Date$
  • bcdaqwidgets/trunk/src/bcdaqwidgets_demos/pyside_probe.py

    r1402 r1443  
    11#!/usr/bin/env python
    22
    3 ########### SVN repository information ###################
    4 # $Date$
    5 # $Author$
    6 # $Revision$
    7 # $URL$
    8 # $Id$
    9 ########### SVN repository information ###################
     3'''
     4PySide implementation of EPICS probe
    105
    11 # from Matt Newville, CARS, University of Chicago
     6:author: Matt Newville, CARS, University of Chicago
     7:note: Does not use bcdaqwidgets
     8'''
    129
    1310import epics
     
    1613from PySide.QtGui import QWidget, QLabel, QLineEdit, QGridLayout, QApplication
    1714
    18 sys.path.insert(0, os.path.abspath('..'))
    19 import bcdaqwidgets
    20 
    2115class PVProbe(QWidget):
    22     ''' '''
     16    '''frame that monitors a user-entered EPICS PV'''
    2317    def __init__(self, parent=None):
    2418        QWidget.__init__(self, parent)
     
    4236
    4337    def onPVNameReturn(self):
     38        '''responds when user enters a new PV'''
    4439        if self.pv is not None:
    4540            self.pv.remove_callback()
     
    4843
    4944    def onPVChange(self, pvname=None, char_value=None, **kws):
     45        '''updates the widget (not thread-safe)'''
    5046        self.value.setText(char_value)
    5147
    52 if __name__ == '__main__':
     48
     49def main():
    5350    app = QApplication(sys.argv)
    5451    probe = PVProbe()
    5552    probe.show()
    5653    sys.exit(app.exec_())
     54
     55
     56if __name__ == '__main__':
     57    main()
     58
     59
     60########### SVN repository information ###################
     61# $Date$
     62# $Author$
     63# $Revision$
     64# $URL$
     65# $Id$
     66########### SVN repository information ###################
  • bcdaqwidgets/trunk/src/bcdaqwidgets_demos/vlinac.py

    r1402 r1443  
    11#!/usr/bin/env python
    22
    3 ########### SVN repository information ###################
    4 # $Date$
    5 # $Author$
    6 # $Revision$
    7 # $URL$
    8 # $Id$
    9 ########### SVN repository information ###################
    10 
    113'''
    12 comment
     4provide a basic GUI for the APS EPICS Virtual Linac demo software
    135
    146Copyright (c) 2009 - 2013, UChicago Argonne, LLC.
     
    3830
    3931class DemoView(QtGui.QWidget):
     32    '''simple entry and label widgets for the most important PVs'''
    4033   
    4134    def __init__(self, parent=None, prefix='unknown'):
     
    178171# - - - - - - - - - - - - - - - - - - methods
    179172
    180 def _demo_():
     173def main():
    181174    '''demonstrate use of this module'''
    182175    user = os.environ['USER']
     
    191184
    192185if __name__ == '__main__':
    193     _demo_()
     186    main()
     187
     188
     189########### SVN repository information ###################
     190# $Date$
     191# $Author$
     192# $Revision$
     193# $URL$
     194# $Id$
     195########### SVN repository information ###################
Note: See TracChangeset for help on using the changeset viewer.