<commit_before>export VERSION=3.1

libdir=/usr/lib
bindir=/usr/bin

generated_files = bob/version.py

.PHONY: $(generated_files)

all: $(generated_files)

install: $(generated_files)
	mkdir -p "$(DESTDIR)$(libdir)/python2.4/site-packages/bob"
	cp -a bob/*.py "$(DESTDIR)$(libdir)/python2.4/site-packages/bob/"
	python2.4 $(libdir)/python2.4/compileall.py "$(DESTDIR)$(libdir)/python2.4/site-packages/bob"
	python2.4 -O $(libdir)/python2.4/compileall.py "$(DESTDIR)$(libdir)/python2.4/site-packages/bob"
	install -D -m755 bin/bob $(DESTDIR)$(bindir)/bob

clean:
	rm -f $(generated_files)


bob/version.py:
	echo "version = '$(VERSION)'" >bob/version.py
	@if [[ -x /usr/bin/hg && -d .hg ]] ; then \
		rev=`hg id -i`; \
	elif [ -f .hg_archival.txt ]; then \
		rev=`grep node .hg_archival.txt |cut -d' ' -f 2 |head -c 12`; \
	else \
		rev= ; \
	fi ; \
	echo "revision = '$$rev'" >>bob/version.py<commit_msg>Fix python compilation method<commit_after>prefix = /usr
lib = $(shell arch | sed -r '/x86_64|ppc64|s390x|sparc64/{s/.*/lib64/;q};s/.*/lib/')
libdir = $(prefix)/$(lib)
bindir = $(prefix)/bin

export DESTDIR=
PYTHON=/usr/bin/python2.4
PYCFLAGS=-c 'import compileall, sys;[compileall.compile_dir(x, ddir=x.replace("$(DESTDIR)", ""), quiet=1) for x in sys.argv[1:]]'
VERSION=3.1

generated_files = bob/version.py

.PHONY: $(generated_files)

all: $(generated_files)

install: $(generated_files)
	mkdir -p "$(DESTDIR)$(libdir)/python2.4/site-packages/bob"
	cp -a bob/*.py "$(DESTDIR)$(libdir)/python2.4/site-packages/bob/"
	$(PYTHON) $(PYCFLAGS) "$(DESTDIR)$(libdir)/python2.4/site-packages/bob"
	$(PYTHON) -O $(PYCFLAGS) "$(DESTDIR)$(libdir)/python2.4/site-packages/bob"
	install -D -m755 bin/bob $(DESTDIR)$(bindir)/bob

clean:
	rm -f $(generated_files)


bob/version.py:
	echo "version = '$(VERSION)'" >bob/version.py
	@if [[ -x /usr/bin/hg && -d .hg ]] ; then \
		rev=`hg id -i`; \
	elif [ -f .hg_archival.txt ]; then \
		rev=`grep node .hg_archival.txt |cut -d' ' -f 2 |head -c 12`; \
	else \
		rev= ; \
	fi ; \
	echo "revision = '$$rev'" >>bob/version.py
{'fraction_non_alphanumeric': 0.21758135016998542, 'fraction_numerical': 0.027683341427877612, 'mean_word_length': 3.881516587677725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '428388', 'n_tokens_mistral': 937, 'n_tokens_neox': 869, 'n_words': 164}