<commit_before>include $(B_BASE)/common.mk
include $(B_BASE)/rpmbuild.mk

# Figure out which set of spec files we're building based on 'COMPONENT'
CONFIG_DIR=$(shell ./get_config_dir.py)

#### Build-system boilerplate above ####
.PHONY: build buildrpms
build: $(MY_SOURCES)/MANIFEST

buildrpms:
	echo "Installing latest planex"
	@cd .. && python setup.py install
	echo confdir $(CONFIG_DIR)
	chown -R root.root $(CONFIG_DIR)/*
	rm -rf ./planex-build-root/SRPMS/*
	planex-configure --mirror_path "file:///distfiles/ocaml2/" --repos_path "/repos" $(CONFIG_DIR)
	planex-build --xs-build-sys --no-mock --external-dependencies /obj/.ext_dependencies
	cp -r ./planex-build-root/RPMS $(MY_OUTPUT_DIR)
	rm -rf $(MY_OUTPUT_DIR)/RPMS/repodata
	cp -r ./planex-build-root/SRPMS $(MY_OUTPUT_DIR)
	rpm -Uvh --force --nodeps ./planex-build-root/RPMS/*.rpm

#### Build-system boilerplate below ####

$(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) buildrpms
	@for i in $(shell /bin/ls -1 ${RPM_SRPMSDIR}); do \
		path=$(MY_OUTPUT_DIR)/SRPMS/$${i}; \
		echo -n "ocaml "; \
		$(RPM) --qf %{License} -qp $${path} | sed -e 's/ /_/g'; \
		echo " file $${path}"; \
	done > $@.tmp
	mv -f $@.tmp $@

.PHONY: clean
clean:
	rm -rf ./planex-build-root<commit_msg>Use mock for ocaml and api-libs build system components<commit_after>include $(B_BASE)/common.mk
include $(B_BASE)/rpmbuild.mk

# Figure out which set of spec files we're building based on 'COMPONENT'
CONFIG_DIR=$(shell ./get_config_dir.py)

#### Build-system boilerplate above ####
.PHONY: build buildrpms
build: $(MY_SOURCES)/MANIFEST

buildrpms:
	echo "Installing latest planex"
	@cd .. && python setup.py install
	echo confdir $(CONFIG_DIR)
	chown -R root.root $(CONFIG_DIR)/*
	rm -rf ./planex-build-root/SRPMS/*
	planex-configure --mirror_path "file:///distfiles/ocaml2/" --repos_path "/repos" $(CONFIG_DIR)
	planex-build --xs-build-sys --external-dependencies /obj/.ext_dependencies
	cp -r ./planex-build-root/RPMS $(MY_OUTPUT_DIR)
	rm -rf $(MY_OUTPUT_DIR)/RPMS/repodata
	cp -r ./planex-build-root/SRPMS $(MY_OUTPUT_DIR)
	rpm -Uvh --force --nodeps ./planex-build-root/RPMS/*.rpm

#### Build-system boilerplate below ####

$(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) buildrpms
	@for i in $(shell /bin/ls -1 ${RPM_SRPMSDIR}); do \
		path=$(MY_OUTPUT_DIR)/SRPMS/$${i}; \
		echo -n "ocaml "; \
		$(RPM) --qf %{License} -qp $${path} | sed -e 's/ /_/g'; \
		echo " file $${path}"; \
	done > $@.tmp
	mv -f $@.tmp $@

.PHONY: clean
clean:
	rm -rf ./planex-build-root
{'fraction_non_alphanumeric': 0.1838529176658673, 'fraction_numerical': 0.0015987210231814548, 'mean_word_length': 3.7226415094339624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4955555', 'n_tokens_mistral': 1024, 'n_tokens_neox': 976, 'n_words': 232}