Roundup Tracker - Issues

Message6042

Author rouilj
Recipients ber, cscortes, rouilj, techtonik
Date 2017-10-21.04:06:33
Message-id <1508558794.24.0.213398074469.issue2550720@psf.upfronthosting.co.za>
In-reply-to
I installed python 2.7.14 on windows 10.

Modified setup.py adding:

      scripts.append('scripts/windows_install_script.py')

after the definition of the script variable. Then ran:

  python setup.py bdist_wininst --user-access-control force --install-
script windows_install_script.py

with the contents of scripts/window_install_script.py:

====
from __future__ import print_function

import sys

# Log output to a file (for test)                                               
f = open(r"C:\temp\test.txt",'w')
print('Creating Shortcut', file=f)
f.close()

if sys.platform == 'win32':
    try:
        sys.stdout.write("write to sys.stdout\n")
        sys.stderr.write("write to sys.stderr\n")
        print ("Checking for pywin32")
        import win32serviceutil
        print ("Found win32serviceutil")
        import win32service
        print ("Found win32service")
        print ("Complete.")
    except:
        print ("""                                                              
        If you want to run roundup as a windows service you have to             
        install the pywin32 module from:                                        
                                                                                
        https://sourceforge.net/projects/pywin32/                               
                                                                                
        Otherwise you can run the roundup-server manually or use                
        demo mode.                                                              
        """)

print ("Install complete")
====

This created an installer, but when run the installer doesn't seem to 
run the python script.

Note the script above tries a few ways to write output.
No output ever showed up so I tried a few ways to write to the user.
Then I added the code to write to a file. The lack of a file in
c:\temp tells me that the script isn't being run.

No clue what the issue is but recording this here in case somebody else 
has a bright idea on telling the user to install the pywin32
module if it's not found.
History
Date User Action Args
2017-10-21 04:06:34rouiljsetmessageid: <1508558794.24.0.213398074469.issue2550720@psf.upfronthosting.co.za>
2017-10-21 04:06:34rouiljsetrecipients: + rouilj, ber, techtonik, cscortes
2017-10-21 04:06:34rouiljlinkissue2550720 messages
2017-10-21 04:06:33rouiljcreate