Source

moin-2.0 / Makefile

#
# Makefile for MoinMoin
#

# location for the wikiconfig.py we use for testing:
export PYTHONPATH=$(PWD)

all:
	python setup.py build

test:
	py.test --pep8 -rs

dist: clean-devwiki
	-rm MANIFEST
	python setup.py sdist

docs:
	make -C docs html

# this needs the sphinx-autopackage script in the toplevel dir:
apidoc:
	sphinx-apidoc -f -o docs/devel/api MoinMoin

interwiki:
	wget -U MoinMoin/Makefile -O contrib/interwiki/intermap.txt "http://master19.moinmo.in/InterWikiMap?action=raw"
	chmod 664 contrib/interwiki/intermap.txt

pylint:
	@pylint --disable-msg=W0142,W0511,W0612,W0613,C0103,C0111,C0302,C0321,C0322 --disable-msg-cat=R MoinMoin

# Automate creation of the support archive from a virtualenv site-packages directory
support:
	@# do NOT name it "site-packages", but "support":
	@cp -a env/lib/python2.7/site-packages support
	@# remove compiled code files:
	@find support -name "*.pyc" -exec rm {} \;
	@find support -name "*.pyo" -exec rm {} \;
	@# documentation generation support not needed on GAE:
	@rm -rf support/sphinx
	@# package installers not needed/supported on GAE:
	@rm -rf support/distribute support/pip
	@# test support and suites not needed in production:
	@rm -rf support/_pytest support/pytest*.py support/py.test*
	@rm -rf support/py support/execnet support/pep8.py support/selenium
	@rm -rf support/flask/testsuite support/werkzeug/testsuite
	@# misc. egg and path stuff, not needed:
	@rm -rf support/*.egg support/*.egg-info support/*.egg-link support/*.pth
	@# we need to add a __init__.py to the namespace packages:
	@touch support/flaskext/__init__.py support/xstatic/__init__.py support/xstatic/pkg/__init__.py

# Create Dist archive with support
supportdist:
	@python setup.py sdist
	@find dist -name 'moin-*.tar.gz' -exec tar -xzf {} -C dist/ \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec cp -r support/ {} \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec cp moin.py {} \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec cp app.yaml {} \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec cp wikiconfig_gae.py {} \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec sh -c "rm -rf {}/moin.egg-info {}/PKG-INFO {}/MANIFEST.in {}/setup.* {}/quickinstall* {}/Makefile" \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec bash -c 'tar czf dist/`basename {}`_with_support.tar.gz -C dist/ `basename {}`' \;
	@find dist -mindepth 1 -maxdepth 1 -name "moin-*" -type d -exec rm -rf {} \;

supporttgz:
	@# create the support archive:
	@tar czf moin2-support.tgz support

clean: clean-devwiki clean-pyc clean-orig clean-rej
	-rm -rf build

clean-devwiki:
	-rm -rf wiki/data/content
	-rm -rf wiki/data/userprofiles
	-rm -rf wiki/index

clean-pyc:
	find . -name "*.pyc" -exec rm -rf "{}" \; 

clean-orig:
	find . -name "*.orig" -exec rm -rf "{}" \; 

clean-rej:
	find . -name "*.rej" -exec rm -rf "{}" \; 

.PHONY: all dist docs interwiki check-tabs pylint \
	clean clean-devwiki clean-pyc clean-orig clean-rej
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.