0

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?

user1877600
  • 627
  • 1
  • 9
  • 26
  • What error do you get when you try to run it? What is the layout of your source directory where you're building the installer? – Thomas K Nov 21 '17 at 10:12
  • The error message is " 'python' is not recognized as an internal or external command, operable program or batch file.". The project structure is rather irrelevant I put all source files to python package src. The issue is how to configure python installer to automatically update environmental variable PATH – user1877600 Nov 21 '17 at 10:45

0 Answers0