conda-forge / pypy3.6-feedstock

A conda-smithy repository for pypy3.6.
BSD 3-Clause "New" or "Revised" License
4 stars 13 forks source link

remove build artifact directory in build.sh #92

Open mattip opened 1 year ago

mattip commented 1 year ago

When running the aarch64/ppc64le builds, it is important there be only one _sysconfigdata__* file in the build directory, since these are run 4 times (pypy3.8, pypy3.9) * (openssl1.1, openssl3.4)

So make sure this fix goes into the next PR:

diff --git a/recipe/build.sh b/recipe/build.sh
index f9e49c3..98f33b4 100755
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -123,9 +123,11 @@ fi
 # builds the file in ./build/lib-<platform_tag>
 host_gnu_type=$(${RELEASE_DIR}/config.guess)
 pushd /tmp
+rm -rf build
 pypy -m sysconfig --generate-posix-vars HOST_GNU_TYPE $host_gnu_type
 cp build/*/_sysconfigdata*.py $PREFIX/lib/pypy${PY_VERSION}
 sysconfigdata_name=$(basename $(ls build/*/_sysconfigdata*.py) | rev | cut -b 4- | rev)
+rm -rf build
 popd

 echo sysconfig $(pypy -c "from distutils import sysconfig; print(sysconfig)")
mattip commented 1 year ago

whoops. Spent way too long reaching the conclusion that I didn't do this for v7.3.11 :frowning_face:

Also: export the variables instead of setting them:

--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -24,16 +24,17 @@ if [[ "$target_platform" == "linux"* ]]; then
    export CPATH=${PREFIX}/include
 fi

-GOAL_DIR=$PYPY3_SRC_DIR/pypy/goal
-RELEASE_DIR=$PYPY3_SRC_DIR/pypy/tool/release
+export GOAL_DIR=$PYPY3_SRC_DIR/pypy/goal
+export RELEASE_DIR=$PYPY3_SRC_DIR/pypy/tool/release
+
+export PYPY_PKG_NAME=pypy3
+export BUILD_DIR=${PREFIX}/../build
+export TARGET_DIR=${PREFIX}/../target
+export ARCHIVE_NAME="${PYPY_PKG_NAME}-${PKG_VERSION}"
+export PYPY_PACKAGE_WITHOUTTK=1
+export PYPY_NO_EMBED_DEPENDENCIES=1
+export PYPY_NO_MAKE_PORTABLE=1

-PYPY_PKG_NAME=pypy3
-BUILD_DIR=${PREFIX}/../build
-TARGET_DIR=${PREFIX}/../target
-ARCHIVE_NAME="${PYPY_PKG_NAME}-${PKG_VERSION}"
-PYPY_PACKAGE_WITHOUTTK=1
-PYPY_NO_EMBED_DEPENDENCIES=1
-PYPY_NO_MAKE_PORTABLE=1

 # Build PyPy in stages
 # Force the build to use this directory
h-vetinari commented 1 year ago

whoops. Spent way too long reaching the conclusion that I didn't do this for v7.3.11 ☹️

Perhaps a better reminder is an open PR with the required changes (or even merging those)?