summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile97
1 files changed, 15 insertions, 82 deletions
diff --git a/Makefile b/Makefile
index 1cfeecb4..84497607 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,16 @@ PYRCC = pyside-rcc
PYLUP = pyside-lupdate
LRELE = lrelease
+# pyinst dist dir
+
+DIST = dist/bitmask/
+DIST_OSX = dist/Bitmask.app/
+DIST_OSX_RES = dist/Bitmask.app/Contents/Resources/
+NEXT_VERSION = $(shell cat pkg/next-version)
+DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/
+GIT_COMMIT = $(shell git rev-parse HEAD)
+LEAP_BUILD_DIR = leap_thirdparty_build/
+
#################################
# DO NOT EDIT FOLLOWING
@@ -87,88 +97,11 @@ manpages:
apidocs:
@sphinx-apidoc -o docs/api src/leap/bitmask
-do_cprofile:
- python -m cProfile -o bitmask.cprofile src/leap/bitmask/app.py --debug -N
-
-view_cprofile:
- cprofilev bitmask.cprofile
-
-mailprofile:
- gprof2dot -f pstats /tmp/leap_mail_profile.pstats -n 0.2 -e 0.2 | dot -Tpdf -o /tmp/leap_mail_profile.pdf
-
-do_lineprof:
- LEAP_PROFILE_IMAPCMD=1 LEAP_MAIL_MANHOLE=1 kernprof.py -l src/leap/bitmask/app.py --debug
-
-do_lineprof_offline:
- LEAP_PROFILE_IMAPCMD=1 LEAP_MAIL_MANHOLE=1 kernprof.py -l src/leap/bitmask/app.py --offline --debug -N
-
-view_lineprof:
- @python -m line_profiler app.py.lprof | $(EDITOR) -
-
-resource_graph:
- #./pkg/scripts/monitor_resource.zsh `ps aux | grep app.py | head -1 | awk '{print $$2}'` $(RESOURCE_TIME)
- ./pkg/scripts/monitor_resource.zsh `pgrep bitmask` $(RESOURCE_TIME)
- display bitmask-resources.png
-
-get_wheels:
- pip install --upgrade setuptools
- pip install --upgrade pip
- pip install wheel
-
-gather_wheels:
- pip wheel --wheel-dir=../wheelhouse pyzmq --build-option "--zmq=bundled"
- # because fuck u1db externals, that's why...
- pip wheel --wheel-dir=../wheelhouse --allow-external dirspec --allow-unverified dirspec --allow-external u1db --allow-unverified u1db -r pkg/requirements.pip
-
-install_wheel:
- # if it's the first time, you'll need to get_wheels first
- pip install --pre --use-wheel --no-index --find-links=../wheelhouse -r pkg/requirements.pip
-
-gather_deps:
- pipdeptree | pkg/scripts/filter-bitmask-deps
-
-install_base_deps:
- for repo in leap_pycommon keymanager leap_mail soledad/common soledad/client; do cd $(CURDIR)/../$$repo && pkg/pip_install_requirements.sh; done
- pkg/pip_install_requirements.sh
-
-pull_leapdeps:
- for repo in $(LEAP_REPOS); do cd $(CURDIR)/../$$repo && git pull; done
-
-checkout_leapdeps_develop:
- for repo in $(LEAP_REPOS); do cd $(CURDIR)/../$$repo && git checkout develop; done
- git checkout develop
-
-checkout_leapdeps_release:
- pkg/scripts/checkout_leap_versions.sh
-
-setup_without_namespace:
- awk '!/namespace_packages*/' setup.py > file && mv file setup.py
-
-sumo_tarball_release: checkout_leapdeps_release setup_without_namespace
- python setup.py sdist --sumo
- git checkout -- src/leap/__init__.py
- git checkout -- src/leap/bitmask/_version.py
- rm -rf src/leap/soledad
- git checkout -- setup.py
-
-# XXX We need two sets of sumo-tarballs: the one published for a release
-# (that will pick the pinned leap deps), and the other which will be used
-# for the nightly builds.
-# TODO change naming scheme for sumo-latest: should include date (in case
-# bitmask is not updated bu the dependencies are)
-
-sumo_tarball_latest: checkout_leapdeps_develop pull_leapdeps setup_without_namespace
- python setup.py sdist --sumo # --latest
- git checkout -- src/leap/__init__.py
- git checkout -- src/leap/bitmask/_version.py
- rm -rf src/leap/soledad
- git checkout -- setup.py
-
-pyinst:
- pyinstaller -y pkg/pyinst/bitmask.spec
-
-clean_pkg:
- rm -rf build dist
+include pkg/deps.mk
+include pkg/tools/profile.mk
+include pkg/sumo-tarballs.mk
+include pkg/pyinst/pyinst-build.mk
+include pkg/branding/branding.mk
clean :
$(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc)