I am developing some pseudo-GUI application (based on thinker) and I need to create executable Windows Installer. I created the main function just creates the logger and the input widget.
import logging
import sys
import os
import datetime
import InputWidget
logger = logging.getLogger("xxx")
def main():
filename = "xxx" + datetime.datetime.now().strftime('%Y-%m-%d-%H.%M.%S') + ".log"
log_file = os.path.abspath(os.path.join('logs',filename))
logging.basicConfig(filename=log_file,
filemode='a',
format='%(asctime)s:%(msecs)d %(levelname)s %(name)s \t %(message)s',
datefmt='%H:%M:%S',
level=logging.DEBUG)
logger.info("Start application")
widget = InputWidget.InputWidget()
widget.run()
Then I created installer.cfg file following this example
[Application]
name=xxx
version=1.0
entry_point=main:main
icon=config/Stopwatch.ico
console=true
[Python]
version=2.7.14
bitness=64
[Include]
# Importable packages that your application requires, one per line
packages = src
future
gspread
impala
mistune
numpy
oauth2client
pandas
pypi_wheels = google-api-python-client==1.6.4
PyDrive==1.3.1
Pygments==2.2.0
pygsheets==1.1.3
# Other files and folders that should be installed
files = config\
logs\
But after installation, the windows is not able to find the python. How can I specify the python installation point?
Can you tell how can I export the environmental variables?
How can I improve my installer.cfg file?
Is it a good idea to use pynsist as a deployment tool? Maybe you have a better suggestion?