aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-09-22 21:29:50 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-11-07 19:39:26 +0200
commit24369e749e874cb871727dbdd02ca95b3eb65a04 (patch)
tree9f96ce672e84dd75d26c89d44d16f332baa3ef4a /data
parentdrop py3.8 and make py3.11 official (diff)
downloadpkgcore-24369e749e874cb871727dbdd02ca95b3eb65a04.tar.gz
pkgcore-24369e749e874cb871727dbdd02ca95b3eb65a04.tar.bz2
pkgcore-24369e749e874cb871727dbdd02ca95b3eb65a04.zip
build backend: use custom wrapper around flit
For pkgcore we need to run multiple preparations of generating files before creating sdist or wheel. Flit is a very simple and nice build backend, much more than setuptools. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'data')
-rw-r--r--data/lib/pkgcore/ebd/Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/data/lib/pkgcore/ebd/Makefile b/data/lib/pkgcore/ebd/Makefile
new file mode 100644
index 000000000..ec6280a33
--- /dev/null
+++ b/data/lib/pkgcore/ebd/Makefile
@@ -0,0 +1,47 @@
+PYTHON ?= python
+REPO_SRC = ../../../../src
+PYTHON_CALL = PYTHONPATH=$(REPO_SRC) PYTHONDONTWRITEBYTECODE=1 $(PYTHON)
+
+TARGET = .generated
+KNOWN_EAPI = 0 1 2 3 4 5 6 7 8
+
+all: funcs cmds libs
+
+clean:
+ $(RM) -r $(TARGET)
+
+
+.PHONY: funcs
+funcs: $(TARGET)/funcs/global $(addprefix $(TARGET)/funcs/,$(KNOWN_EAPI))
+
+$(TARGET)/funcs/%:
+ @mkdir -p $(dir $@)
+ ./generate_eapi_func_list $* > $@
+$(TARGET)/funcs/global:
+ @mkdir -p $(dir $@)
+ ./generate_global_func_list > $@
+
+
+.PHONY: cmds
+cmds: $(addprefix $(TARGET)/cmds/,$(KNOWN_EAPI))
+$(TARGET)/cmds/%:
+ @mkdir -p $@
+ ./generate_eapi_cmd_list -b $* > $@/banned
+ ./generate_eapi_cmd_list -d $* > $@/deprecated
+ ./generate_eapi_cmd_list -i $* > $@/internal
+
+
+.PHONY: libs
+libs: $(addprefix $(TARGET)/libs/,$(KNOWN_EAPI))
+
+.SECONDARY: $(TARGET)/libs/phases-%
+$(TARGET)/libs/phases-%:
+ @mkdir -p $(dir $@)
+ $(PYTHON_CALL) -c "from pkgcore.ebuild import eapi; print('\n'.join(eapi.eapi$*.phases.values()))" > $@
+
+$(TARGET)/libs/%: $(TARGET)/libs/phases-%
+ @mkdir -p $@
+ ./generate_eapi_lib $* > $@/global
+ for phase in $$(cat $<); do \
+ ./generate_eapi_lib -s $${phase} $* > $@/$${phase}; \
+ done