<commit_before>
PACKAGE_NAME=canossa
DEPENDENCIES=tff termprop
PYTHON=python
RM=rm -rf

.PHONY: smoketest nosetest build setuptools install uninstall clean update

build: update_license_block smoketest
	$(PYTHON) setup.py sdist
	python2.5 setup.py bdist_egg
	python2.6 setup.py bdist_egg
	python2.7 setup.py bdist_egg

update_license_block:
	chmod +x update_license
	find . -type f | grep '\(.py\|.c\)$$' | xargs ./update_license

setuptools:
	$(PYTHON) -c "import setuptools" || \
		curl http://peak.telecommunity.com/dist/ez_setup.py | $(PYTHON)

install: smoketest setuptools
	$(PYTHON) setup.py install

uninstall:
	for package in $(PACKAGE_NAME) $(DEPENDENCIES); \
	do \
		pip uninstall -y $$package; \
	done

clean:
	for name in dist build *.egg-info htmlcov *.pyc *.o; \
		do find . -type d -name $$name || true; \
	done | xargs $(RM)

smoketest:
	python2.5 setup.py test
	python2.6 setup.py test
	python2.7 setup.py test

nosetest:
	if $$(which nosetests); \
	then \
	    nosetests --with-doctest \
	              --with-coverage \
	              --cover-html \
	              --cover-package=sskk; \
	else \
	    $(PYTHON) setup.py test; \
	fi

update: clean smoketest
	$(PYTHON) setup.py register
	$(PYTHON) setup.py sdist upload
	python2.5 setup.py bdist_egg upload
	python2.6 setup.py bdist_egg upload
	python2.7 setup.py bdist_egg upload
<commit_msg>Update Makefile<commit_after>
PACKAGE_NAME=canossa
DEPENDENCIES=tff termprop
PYTHON=python
PYTHON25=python2.5
PYTHON26=python2.6
PYTHON27=python2.7
SETUP_SCRIPT=setup.py
RM=rm -rf
PIP=pip

.PHONY: smoketest nosetest build setuptools install uninstall clean update

setup_environment:
	if test -d tools; do \
		ln -f tools/gitignore .gitignore \
		ln -f tools/vimprojects .vimprojects \
    fi

build: update_license_block smoketest
	$(PYTHON) $(SETUP_SCRIPT) sdist
	$(PYTHON25) $(SETUP_SCRIPT) bdist_egg
	$(PYTHON26) $(SETUP_SCRIPT) bdist_egg
	$(PYTHON27) $(SETUP_SCRIPT) bdist_egg

update_license_block:
	chmod +x update_license
	find . -type f | grep '\(.py\|.c\)$$' | xargs ./update_license

setuptools:
	$(PYTHON) -c "import setuptools" || \
		curl http://peak.telecommunity.com/dist/ez_$(SETUP_SCRIPT) | $(PYTHON)

install: smoketest setuptools
	$(PYTHON) $(SETUP_SCRIPT) install

uninstall:
	for package in $(PACKAGE_NAME) $(DEPENDENCIES); \
	do \
		$(PIP) uninstall -y $$package; \
	done

clean:
	for name in dist build *.egg-info htmlcov *.pyc *.o; \
		do find . -type d -name $$name || true; \
	done | xargs $(RM)

test: smoketest nosetest

smoketest:
	$(PYTHON25) $(SETUP_SCRIPT) test
	$(PYTHON26) $(SETUP_SCRIPT) test
	$(PYTHON27) $(SETUP_SCRIPT) test

nosetest:
	if $$(which nosetests); \
	then \
	    nosetests --with-doctest \
	              --with-coverage \
	              --cover-html \
	              --cover-package=sskk; \
	fi

update: clean smoketest
	$(PYTHON) $(SETUP_SCRIPT) register
	$(PYTHON) $(SETUP_SCRIPT) sdist upload
	$(PYTHON25) $(SETUP_SCRIPT) bdist_egg upload
	$(PYTHON26) $(SETUP_SCRIPT) bdist_egg upload
	$(PYTHON27) $(SETUP_SCRIPT) bdist_egg upload

{'fraction_non_alphanumeric': 0.12659888488028861, 'fraction_numerical': 0.01574286651361102, 'mean_word_length': 3.5319465081723624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '428528', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1203, 'n_words': 290}