Skip to content Skip to sidebar Skip to footer

Pyinstaller With Namespace Packages

I have a module/package structure where I am using namespace packages, I have multiple user made libraries which I keep in separate repositories, and they have fairly generic names

Solution 1:

I just had the same issue. Looked up this: http://pythonhosted.org/PyInstaller/#extending-the-path and added some --paths to my build batch file call.

which is something like:

@echo off
echo ========= %~n0 =========

set pyfile=scriptName.py
set pypath=C:\Python27\Scripts
set buildpath=%temp%
set distpath=%~dp0

%pypath%\pyinstaller.exe --onefile -y %~dp0%pyfile% --distpath=%distpath% --workpath=%buildpath% --specpath=%buildpath% --noupx --paths=D:\Tools\dev\python --paths=D:\somepath

cheers!

Solution 2:

Namespace packages are not supported in Pyinstaller 2.1, it will be supported in later versions.

The solution I use is that in my build script I copy the libs to a common acme folder, temporarily, and add this path to the pathex in Analysis. On *nix systems one can create symlinks instead of copying the repos. Thanks to Hartmut Goebel of the Pyinstaller team for clearifying the issue.

Post a Comment for "Pyinstaller With Namespace Packages"