Tuesday, May 7, 2013

Makespec.py: error: Requires at least one scriptname file

Recently I inherited a set of python scripts with corresponding windows executable files. To create the executable (.exe) file one can used the tool pyinstaller. The scripts were maintained by multiple people using a shared network drive. A development team on the other side of the world needed access to the network share.  To give them access I would have had to work with the corporate network team, which isn't always easy. However, this team has access to our centralized SCM system. As a Release Engineer and Subversion admin, I felt that these scripts should be put into source control. I proceeded to place the scripts in Subversion without any issues. I then needed to create a Jenkins job to execute the pyinstaller scripts. I spent nearly a day hacking the build script, and using uncle Google searching for the error in the header. After hitting my head repeatedly against the wall I discovered the simplest of solutions, and probably the most obvious.

I simply changed this:
C:\apps\pyinstaller\Makespec.py --onefile --out=. --noconsole --name=cl_downloader downloader.py 

usage: python Makespec.py [opts] <scriptname> [<scriptname> ...]
Makespec.py: error: Requires at least one scriptname file

To this:
python C:\apps\pyinstaller\Makespec.py --onefile --out=. --noconsole --name=cl_downloader downloader.py 

I'm hoping that this simple solution will keep someone else from getting a headache.

No comments:

Post a Comment