title: Pyinstaller with relative imports
body: <p>I'm attempting to make a Pyinstaller build for Windows 7 using Pyinstaller 2.1.  The module uses relative imports because the package is typically used in Linux as a 'regular' Python package.  Is there a way to create a spec file to handle this type of setup?  Ideally I would like to have a Python package that I can make a Pyinstaller exe with for Windows and have a 'regular' pip-installable Python package in Linux/OS X.</p>
  
  <p>I was thinking of maybe using hidden imports or something to achieve this.</p>
  
  <p>I've tried using the default Pyinstaller settings and pointing it at my 'main' python script.  I get the following from the resulting exe:</p>
  
  <p>'Attempted relative import in non-package'</p>
  
  <p>This makes sense because I'm pointing Pyinstaller at my main.py file in the package and Pyinstaller is NOT picking up my entire package.  This is just the starting point for using the module from the command-line.  However, you can import it and use it in your own code as well.</p>
  
  <p><strong>Sidenote:</strong></p>
  
  <p>The reasoning is this package requires numpy and scipy.  Yes, I know there are good ways to get these working in Windows with Anaconda, etc.  However, I'm stuck with an exe setup now for legacy reasons.</p>