summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--profiles/osapi/modern.h1
-rw-r--r--project/config/cfgdefs.in3
-rw-r--r--project/config/cfgdefs.sh47
-rw-r--r--project/extras.mk2
-rw-r--r--project/pycgen.mk4
-rw-r--r--project/pycompile.mk2
-rwxr-xr-xproject/pydist.sh2
-rw-r--r--project/variants/3.6.3/pydist.mk2
-rw-r--r--project/variants/3.7.1/pydist.mk2
9 files changed, 56 insertions, 9 deletions
diff --git a/profiles/osapi/modern.h b/profiles/osapi/modern.h
index c3328af..e4d6a00 100644
--- a/profiles/osapi/modern.h
+++ b/profiles/osapi/modern.h
@@ -310,7 +310,6 @@
#define ENABLE_IPV6 1
#define WITH_DOC_STRINGS 1
#define WITH_LIBINTL 1
-#define WITH_PYMALLOC 1
#define WITH_THREAD 1
diff --git a/project/config/cfgdefs.in b/project/config/cfgdefs.in
index 2491c47..651a155 100644
--- a/project/config/cfgdefs.in
+++ b/project/config/cfgdefs.in
@@ -3,6 +3,7 @@ PYTHON_VER = @python_ver@
PYTHON_MAJOR = @python_major@
PYTHON_MINOR = @python_minor@
PYTHON_MICRO = @python_micro@
-PYTHON_SOABI = cpython-$(PYTHON_MAJOR)$(PYTHON_MINOR)-$(CCHOST)
+PYTHON_ABIFL = @python_abifl@
+PYTHON_SOABI = cpython-$(PYTHON_MAJOR)$(PYTHON_MINOR)$(PYTHON_ABIFL)-$(CCHOST)
PYTHON_SOEXT = .$(PYTHON_SOABI)$(OS_LIB_SUFFIX)
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
index cde8eb6..ecb0625 100644
--- a/project/config/cfgdefs.sh
+++ b/project/config/cfgdefs.sh
@@ -19,8 +19,23 @@
. "$mb_project_dir/sofort/cfgtest/cfgtest.sh"
+pycfg_pydebug=
+pycfg_pymalloc=
+
for arg ; do
case "$arg" in
+ --with-pydebug )
+ pycfg_pydebug='d' ;;
+
+ --without-pydebug )
+ pycfg_pydebug= ;;
+
+ --with-pymalloc )
+ pycfg_pymalloc='m' ;;
+
+ --without-pymalloc )
+ pycfg_pymalloc= ;;
+
*)
error_msg ${arg#}: "unsupported config argument."
exit 2
@@ -64,6 +79,24 @@ cfgdefs_detect_python_version()
}
+cfgdefs_set_option_variables()
+{
+ python_abifl=$pycfg_pydebug$pycfg_pymalloc
+}
+
+
+cfgdefs_output_options()
+{
+ if [ -n "$pycfg_pydebug" ]; then
+ cfgtest_cflags_append '-DPy_DEBUG'
+ fi
+
+ if [ -n "$pycfg_pymalloc" ]; then
+ cfgtest_cflags_append '-DWITH_PYMALLOC'
+ fi
+}
+
+
cfgdefs_output_custom_defs()
{
sed \
@@ -71,6 +104,7 @@ cfgdefs_output_custom_defs()
-e 's/@python_major@/'"$python_major"'/g' \
-e 's/@python_minor@/'"$python_minor"'/g' \
-e 's/@python_micro@/'"$python_micro"'/g' \
+ -e 's/@python_abifl@/'"$python_abifl"'/g' \
"$mb_project_dir/project/config/cfgdefs.in" \
>> "$mb_pwd/cfgdefs.mk"
}
@@ -377,6 +411,11 @@ cfgdefs_perform_target_tests()
[ $python_major = '3' ] && \
cfgtest_makevar_append '-Wl,--as-needed -llzma -Wl,--no-as-needed'
+ # options
+ cfgtest_newline
+ cfgtest_comment 'target options'
+ cfgdefs_output_options
+
# pretty cfgdefs.mk
cfgtest_newline
}
@@ -393,6 +432,11 @@ cfgdefs_perform_native_tests()
# ncurses libs
cfgtest_ldflags_append $mb_ncurses_libs
+ # options
+ cfgtest_newline
+ cfgtest_comment '(native) pycompile options'
+ cfgdefs_output_options
+
# pretty cfgdefs.mk
cfgtest_newline
}
@@ -404,6 +448,9 @@ cfgdefs_set_cfghost_flavors
# python version info
cfgdefs_detect_python_version
+# python-specific configuration
+cfgdefs_set_option_variables
+
# cfgdefs.in --> cfgdefs.mk
cfgdefs_output_custom_defs
diff --git a/project/extras.mk b/project/extras.mk
index 9c1005e..12fe21f 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -9,7 +9,7 @@ CFLAGS_CONFIG += -DPREFIX=\"$(PREFIX)\"
CFLAGS_CONFIG += -DEXEC_PREFIX=\"$(EXEC_PREFIX)\"
CFLAGS_CONFIG += -DVPATH=\"$(SOURCE_DIR)\"
CFLAGS_CONFIG += -DPYTHONPATH=\"$(PYTHON_PATH)\"
-CFLAGS_CONFIG += -DABIFLAGS=\"\"
+CFLAGS_CONFIG += -DABIFLAGS=\"$(PYTHON_ABIFL)\"
CFLAGS_CONFIG += -D_PYTHONFRAMEWORK=\"\"
# python's front-end utility
diff --git a/project/pycgen.mk b/project/pycgen.mk
index 27e7dbd..1cb36f1 100644
--- a/project/pycgen.mk
+++ b/project/pycgen.mk
@@ -11,14 +11,14 @@ PYCGEN_IMPDIR = $(PYCOMPILE_DIR)/$(PYDIST_PYCDIR)/./importlib
PYCGEN_COLDIR = $(PYCOMPILE_DIR)/$(PYDIST_PYCDIR)/./collections
PYCGEN_URLDIR = $(PYCOMPILE_DIR)/$(PYDIST_PYCDIR)/./urllib
-PYCGEN_CFGDAT = $(PYCOMPILE_DIR)/$(PYDIST_PYCDIR)/./_sysconfigdata__$(NATIVE_OS)_.py
+PYCGEN_CFGDAT = $(PYCOMPILE_DIR)/$(PYDIST_PYCDIR)/./_sysconfigdata_$(PYTHON_ABIFL)_$(NATIVE_OS)_.py
PYCGEN_PYSRCS = $(PYDIST_SRCS:$(PYDIST_PYCDIR)/./%.py=$(PYCGEN_PYCDIR)/%.py)
PYCGEN_PYENCS = $(PYDIST_ENCODINGS_SRCS:$(PYDIST_ENCDIR)/%.py=$(PYCGEN_ENCDIR)/%.py)
PYCGEN_PYIMPS = $(PYDIST_IMPORTLIB_SRCS:$(PYDIST_IMPDIR)/%.py=$(PYCGEN_IMPDIR)/%.py)
PYCGEN_PYCOLS = $(PYDIST_COLLECTIONS_SRCS:$(PYDIST_COLDIR)/%.py=$(PYCGEN_COLDIR)/%.py)
PYCGEN_PYURLS = $(PYDIST_URLLIB_SRCS:$(PYDIST_URLDIR)/%.py=$(PYCGEN_URLDIR)/%.py)
-$(PYDIST_PYCDIR)/./_sysconfigdata__$(PYTHON_PLATFORM)_.py:
+$(PYDIST_PYCDIR)/./_sysconfigdata_$(PYTHON_ABIFL)_$(PYTHON_PLATFORM)_.py:
mkdir -p $(PYDIST_PYCDIR)
printf 'build_time_vars = {}\n' > $@
diff --git a/project/pycompile.mk b/project/pycompile.mk
index abac1f7..0ee01b8 100644
--- a/project/pycompile.mk
+++ b/project/pycompile.mk
@@ -24,7 +24,7 @@ PYCOMPILE_CFLAGS += -DPREFIX=\"$(PYCOMPILE_PREFIX)\"
PYCOMPILE_CFLAGS += -DEXEC_PREFIX=\"$(PYCOMPILE_PREFIX)\"
PYCOMPILE_CFLAGS += -DPYTHONPATH=\"$(PYCOMPILE_PATH)\"
PYCOMPILE_CFLAGS += -DSOABI=\"$(PYTHON_SOABI)\"
-PYCOMPILE_CFLAGS += -DABIFLAGS=\"\"
+PYCOMPILE_CFLAGS += -DABIFLAGS=\"$(PYTHON_ABIFL)\"
PYCOMPILE_CFLAGS += -D_PYTHONFRAMEWORK=\"\"
PYCOMPILE_CFLAGS += $(NATIVE_CC_CFLAGS)
diff --git a/project/pydist.sh b/project/pydist.sh
index 14617b8..b51aba2 100755
--- a/project/pydist.sh
+++ b/project/pydist.sh
@@ -33,7 +33,7 @@ printf 'PYDIST_LIBDIR = lib\n'
printf 'PYDIST_PYCDIR = lib/$(NICKNAME)\n\n\n'
printf 'PYDIST_SYSCFG_SRCS = \\\n'
-printf '\t$(PYDIST_PYCDIR)/./_sysconfigdata__$(PYTHON_PLATFORM)_.py\n\n'
+printf '\t$(PYDIST_PYCDIR)/./_sysconfigdata_$(PYTHON_ABIFL)_$(PYTHON_PLATFORM)_.py\n\n'
cpvar=$(printf '\tcp -p $(%s)' 'PYDIST_SYSCFG_SRCS')
printf '%-80s$(DESTDIR)/$(LIBDIR)/$(PACKAGE)\n' "$cpvar" >> $pysrcs
diff --git a/project/variants/3.6.3/pydist.mk b/project/variants/3.6.3/pydist.mk
index 73d11fa..0c12cea 100644
--- a/project/variants/3.6.3/pydist.mk
+++ b/project/variants/3.6.3/pydist.mk
@@ -8,7 +8,7 @@ PYDIST_PYCDIR = lib/$(NICKNAME)
PYDIST_SYSCFG_SRCS = \
- $(PYDIST_PYCDIR)/./_sysconfigdata__$(PYTHON_PLATFORM)_.py
+ $(PYDIST_PYCDIR)/./_sysconfigdata_$(PYTHON_ABIFL)_$(PYTHON_PLATFORM)_.py
PYDIST_SRCS = \
$(PYDIST_PYCDIR)/./__future__.py \
diff --git a/project/variants/3.7.1/pydist.mk b/project/variants/3.7.1/pydist.mk
index 40f02b0..6e8f79f 100644
--- a/project/variants/3.7.1/pydist.mk
+++ b/project/variants/3.7.1/pydist.mk
@@ -8,7 +8,7 @@ PYDIST_PYCDIR = lib/$(NICKNAME)
PYDIST_SYSCFG_SRCS = \
- $(PYDIST_PYCDIR)/./_sysconfigdata__$(PYTHON_PLATFORM)_.py
+ $(PYDIST_PYCDIR)/./_sysconfigdata_$(PYTHON_ABIFL)_$(PYTHON_PLATFORM)_.py
PYDIST_SRCS = \
$(PYDIST_PYCDIR)/./__future__.py \