takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
930 stars 123 forks source link

building a project that has code in src directory #228

Closed bfmcneill closed 2 years ago

bfmcneill commented 3 years ago

I can't seem to figure out how to build a project where the package is in one directory below config file

src
    \
     guessnumber

Should I put the installer.cfg inside the src file or is there some way to configure installer.cfg to reach in one level?

takluyver commented 3 years ago

It finds the package like an import (import guessnumber). So you can install it locally in the same Python environment as Pynsist, or set the environment variable PYTHONPATH=src/ while running Pynsist, or anything else that would make it importable.

I probably wouldn't design it this way now, but it is what it is.