1 # === makefile ------------------------------------------------------------===
4 CACHE_ROOT=${ROOT}/.cache
7 -include Makefile.local
10 all: ${PKG_ROOT}/.stamp-h
14 "${PKG_ROOT}"/bin/coverage run "${PKG_ROOT}"/bin/trial p2pool
15 "${PKG_ROOT}"/bin/coverage xml -o build/report/coverage.xml
19 "${PKG_ROOT}"/bin/python run_p2pool.py
23 "${PKG_ROOT}"/bin/ipython
36 -rm -rf "${CACHE_ROOT}"
38 .PHONY: maintainer-clean
39 maintainer-clean: distclean
40 @echo 'This command is intended for maintainers to use; it'
41 @echo 'deletes files that may need special tools to rebuild.'
46 # ===--------------------------------------------------------------------===
48 ${CACHE_ROOT}/virtualenv/virtualenv-1.8.2.tar.gz:
49 mkdir -p ${CACHE_ROOT}/virtualenv
50 sh -c "cd ${CACHE_ROOT}/virtualenv && curl -O http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.8.2.tar.gz"
52 ${PKG_ROOT}/.stamp-h: conf/requirements*.pip ${CACHE_ROOT}/virtualenv/virtualenv-1.8.2.tar.gz
53 # Because build and run-time dependencies are not thoroughly tracked,
54 # it is entirely possible that rebuilding the development environment
55 # on top of an existing one could result in a broken build. For the
56 # sake of consistency and preventing unnecessary, difficult-to-debug
57 # problems, the entire development environment is rebuilt from scratch
58 # everytime this make target is selected.
61 # The ``${PKG_ROOT}`` directory, if it exists, is removed by the
62 # ``clean`` target. The PyPI cache is nonexistant if this is a freshly
63 # checked-out repository, or if the ``distclean`` target has been run.
64 # This might cause problems with build scripts executed later which
65 # assume their existence, so they are created now if they don't
67 mkdir -p "${PKG_ROOT}"
68 mkdir -p "${CACHE_ROOT}"/pypi
70 # ``virtualenv`` is used to create a separate Python installation for
71 # this project in ``${PKG_ROOT}``.
73 -C "${CACHE_ROOT}"/virtualenv --gzip \
74 -xf "${CACHE_ROOT}"/virtualenv/virtualenv-1.8.2.tar.gz
75 python "${CACHE_ROOT}"/virtualenv/virtualenv-1.8.2/virtualenv.py \
79 --prompt="(p2pool) " \
81 -rm -rf "${CACHE_ROOT}"/virtualenv/virtualenv-1.8.2
83 # readline is installed here to get around a bug on Mac OS X which is
84 # causing readline to not build properly if installed from pip.
85 "${PKG_ROOT}"/bin/easy_install readline
87 # pip is used to install Python dependencies for this project.
88 for reqfile in conf/requirements*.pip; do \
89 "${PKG_ROOT}"/bin/python "${PKG_ROOT}"/bin/pip install \
90 --download-cache="${CACHE_ROOT}"/pypi \
95 touch "${PKG_ROOT}"/.stamp-h
97 # ===--------------------------------------------------------------------===
99 # ===--------------------------------------------------------------------===