Skip to content

Commit

Permalink
Build executable using PyInstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed May 8, 2016
1 parent 425f9b4 commit 0ebc358
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pyunit.xml
# Build and release directories
build
dist
/*.spec

# Sublime Text
*.sublime-workspace
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* virtualenv: https://pypi.python.org/pypi/virtualenv#installation
* Pandoc: http://johnmacfarlane.net/pandoc/installing.html
* Graphviz: http://www.graphviz.org/Download.php
* UPX: http://upx.sourceforge.net/#downloadupx

### Installation

Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ NOSE := $(BIN)/nosetests
PYTEST := $(BIN)/py.test
COVERAGE := $(BIN)/coverage
SNIFFER := $(BIN)/sniffer
PYINSTALLER := $(BIN)/pyinstaller

# Flags for PHONY targets
INSTALLED_FLAG := $(ENV)/.installed
Expand Down Expand Up @@ -115,7 +116,7 @@ $(DEPENDS_CI_FLAG): Makefile
.PHONY: depends-dev
depends-dev: env Makefile $(DEPENDS_DEV_FLAG)
$(DEPENDS_DEV_FLAG): Makefile
$(PIP) install --upgrade pip pep8radius pygments docutils pdoc wheel readme sniffer
$(PIP) install --upgrade pip pep8radius pygments docutils pdoc wheel readme sniffer pyinstaller
ifdef WINDOWS
$(PIP) install --upgrade pywin32
else ifdef MAC
Expand Down Expand Up @@ -251,7 +252,7 @@ clean-all: clean .clean-env .clean-workspace

.PHONY: .clean-dist
.clean-dist:
rm -rf dist build
rm -rf *.spec dist build

.PHONY: .clean-env
.clean-env: clean
Expand Down Expand Up @@ -294,6 +295,11 @@ upload: .git-no-changes register
exit -1; \
fi;

.PHONY: exe
exe: depends-dev $(SOURCES)
$(PYINSTALLER) $(PACKAGE)/gui.py --noconfirm --clean --noupx \
--onefile --windowed --name=$(PROJECT)

# System Installation ##########################################################

.PHONY: develop
Expand Down

0 comments on commit 0ebc358

Please sign in to comment.