From 1b98cdbb8b02cba1a2d70f4b169954ce44d7a564 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Sun, 22 Mar 2020 11:59:28 +0100 Subject: [PATCH] Remove conda-forge branding --- recipe/bld.bat | 4 ---- recipe/brand_python.py | 41 ----------------------------------------- recipe/build.sh | 6 ------ 3 files changed, 51 deletions(-) delete mode 100644 recipe/brand_python.py diff --git a/recipe/bld.bat b/recipe/bld.bat index 5688a7f60..068151527 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,9 +1,5 @@ setlocal EnableDelayedExpansion -:: brand Python with conda-forge startup message -%SYS_PYTHON% %RECIPE_DIR%\brand_python.py -if errorlevel 1 exit 1 - :: Compile python, extensions and external libraries if "%ARCH%"=="64" ( set PLATFORM=x64 diff --git a/recipe/brand_python.py b/recipe/brand_python.py deleted file mode 100644 index 0eca88d89..000000000 --- a/recipe/brand_python.py +++ /dev/null @@ -1,41 +0,0 @@ -import argparse -import os -import re - - -platform_file = os.path.join('Lib', 'platform.py') -get_version_file = os.path.join('Python', 'getversion.c') - - -def patch_platform(msg): - with open(platform_file, 'r') as fh: - lines = list(fh) - - lines_it = iter(lines) - with open(platform_file, 'w') as fh: - for line in lines_it: - fh.write(line) - if line.startswith('_sys_version_parser'): - next_line = next(lines_it) - fh.write(" r'([\w.+]+)\s*" + '(?:' + re.escape(' ' + msg) + ')?' + "\s*'\n") - -def patch_get_version(msg): - with open(get_version_file, 'r') as fh: - content = list(fh) - - lines = iter(content) - with open(get_version_file, 'w') as fh: - for line in lines: - if line.strip().startswith('PyOS_snprintf(version, sizeof(version)'): - fh.write(' PyOS_snprintf(version, sizeof(version),\n') - fh.write(' "%.80s ' + msg.replace('"', '\\"') + ' (%.80s) %.80s",\n') - else: - fh.write(line) - - -msg = os.environ.get('python_branding', '') -if msg == '': - msg = "| packaged by conda-forge |" - -patch_platform(msg) -patch_get_version(msg) diff --git a/recipe/build.sh b/recipe/build.sh index 94de7c805..846cb278b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -15,8 +15,6 @@ VERNODOTS=${VER//./} TCLTK_VER=${tk} # Disables some PGO/LTO QUICK_BUILD=no -# Remove once: https://github.com/mingwandroid/conda-build/commit/c68a7d100866df7a3e9c0e3177fc7ef0ff76def9 -CONDA_FORGE=yes _buildd_static=build-static _buildd_shared=build-shared @@ -99,10 +97,6 @@ if [[ ${_OPTIMIZED} = yes ]]; then CXXFLAGS=$(echo "${CXXFLAGS}" | sed "s/-O2/-O3/g") fi -if [[ ${CONDA_FORGE} == yes ]]; then - ${SYS_PYTHON} ${RECIPE_DIR}/brand_python.py -fi - declare -a LTO_CFLAGS=() CPPFLAGS=${CPPFLAGS}" -I${PREFIX}/include"