Zope3 windows service installer
Project description
=====================
z3c.recipe.winservice
=====================
This recipe offers windows service installation support.
The 'service' recipe installes the required scripts and files which can be
used to install a windows service.
Using the ``runscript`` option it is able to make any executable a service.
Options
*******
The 'service' recipe accepts the following options:
name
The windows service name option.
description
The windows service description option.
runzope
The script name which gets run by the winservice.
If the script name contains any path, it's taken as it is, otherwise the
buildout bin folder is prepended. winservice will check on install if this
script exists.
The install takes care of adding ``-script.py`` if necessary.
This script can get setup for exmaple with the z3c.recipe.dev.app recipe.
runscript
The script (.py) or executable (.exe) name to be run by the winservice.
The value will get NO treatment, you need to pass an exact specification.
winservice will check on install if this script/exe exists.
Use this option OR runzope, but never both.
parameters
This value will get passed to the script (runzope or runscript) as a
parameter. The value will get NO treatment, you need to take care of adding
any quotes if necessary.
debug
Adding this option to the recipe wraps the whole script to run into
a catch all except that logs the exception to the windows event log.
This is good for debugging weird exceptions that occur before the Zope
logging system is in place.
This does not work if runscript is an executable.
=======
CHANGES
=======
0.7.0 (2010-10-19)
------------------
- New feature: ``runscript`` and ``parameters``.
With those, this recipe is now capable of making any executable or
python script a service.
- Added more docs and tests.
- Remove compiled winservice.pyc and pyo if they exist.
- Most folder calculation moved to the recipe installer.
winservice.py gets constants, that makes it easier to see what happens.
- Updated tests to be more tolerant to different Python versions.
- Using Python's ``doctest`` module instead of deprecated
``zope.testing.doctest``.
Version 0.6.3 (2009-11-02)
--------------------------
- Do nothing on a non windows platform instead of failing.
Version 0.6.2 (2009-05-13)
--------------------------
- Set current dir for CreateProcess to INSTANCE_HOME otherwise pkg_resources will
be pissed (in a combination with paster)
Version 0.6.1 (2009-05-12)
--------------------------
- kill off pythonw.exe - it just causes problems when something is
written to stdout
- Use python.exe in debug mode -- it will display/log exceptions
Version 0.6.0 (2009-05-10)
--------------------------
- Added debug option to log exceptions for totally misbehaving scripts
- Slight changes to service manager
- virtualenv creates no pythonw.exe -- fallback to python.exe
- tested on winXP pro workstation:
- from service manager:
- service start: OK
- service stop: OK
- service restart: OK
- net
- net start: OK
- net stop: OK
- from instance:
- ``ZMI restart``: OK (restarts)
- task manager kill ``python.exe``: OK (starts again)
Version 0.5.0 (2008-04-12)
--------------------------
- Initial Release
z3c.recipe.winservice
=====================
This recipe offers windows service installation support.
The 'service' recipe installes the required scripts and files which can be
used to install a windows service.
Using the ``runscript`` option it is able to make any executable a service.
Options
*******
The 'service' recipe accepts the following options:
name
The windows service name option.
description
The windows service description option.
runzope
The script name which gets run by the winservice.
If the script name contains any path, it's taken as it is, otherwise the
buildout bin folder is prepended. winservice will check on install if this
script exists.
The install takes care of adding ``-script.py`` if necessary.
This script can get setup for exmaple with the z3c.recipe.dev.app recipe.
runscript
The script (.py) or executable (.exe) name to be run by the winservice.
The value will get NO treatment, you need to pass an exact specification.
winservice will check on install if this script/exe exists.
Use this option OR runzope, but never both.
parameters
This value will get passed to the script (runzope or runscript) as a
parameter. The value will get NO treatment, you need to take care of adding
any quotes if necessary.
debug
Adding this option to the recipe wraps the whole script to run into
a catch all except that logs the exception to the windows event log.
This is good for debugging weird exceptions that occur before the Zope
logging system is in place.
This does not work if runscript is an executable.
=======
CHANGES
=======
0.7.0 (2010-10-19)
------------------
- New feature: ``runscript`` and ``parameters``.
With those, this recipe is now capable of making any executable or
python script a service.
- Added more docs and tests.
- Remove compiled winservice.pyc and pyo if they exist.
- Most folder calculation moved to the recipe installer.
winservice.py gets constants, that makes it easier to see what happens.
- Updated tests to be more tolerant to different Python versions.
- Using Python's ``doctest`` module instead of deprecated
``zope.testing.doctest``.
Version 0.6.3 (2009-11-02)
--------------------------
- Do nothing on a non windows platform instead of failing.
Version 0.6.2 (2009-05-13)
--------------------------
- Set current dir for CreateProcess to INSTANCE_HOME otherwise pkg_resources will
be pissed (in a combination with paster)
Version 0.6.1 (2009-05-12)
--------------------------
- kill off pythonw.exe - it just causes problems when something is
written to stdout
- Use python.exe in debug mode -- it will display/log exceptions
Version 0.6.0 (2009-05-10)
--------------------------
- Added debug option to log exceptions for totally misbehaving scripts
- Slight changes to service manager
- virtualenv creates no pythonw.exe -- fallback to python.exe
- tested on winXP pro workstation:
- from service manager:
- service start: OK
- service stop: OK
- service restart: OK
- net
- net start: OK
- net stop: OK
- from instance:
- ``ZMI restart``: OK (restarts)
- task manager kill ``python.exe``: OK (starts again)
Version 0.5.0 (2008-04-12)
--------------------------
- Initial Release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
z3c.recipe.winservice-0.7.0.zip
(26.8 kB
view details)
File details
Details for the file z3c.recipe.winservice-0.7.0.zip
.
File metadata
- Download URL: z3c.recipe.winservice-0.7.0.zip
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5b8b524edcbe7c8b87e89606463e970dfb5d86fc1cf3492840f4876acad5e62 |
|
MD5 | 14dd02482373e64bcdbbea8f92fedd1d |
|
BLAKE2b-256 | aa82c1a47c376ffb75fa0c7a951fafe856dd75a7abc20f9942e813b0ad76294e |