Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove build artifact directory in build.sh #92

Open
mattip opened this issue Oct 18, 2022 · 2 comments
Open

remove build artifact directory in build.sh #92

mattip opened this issue Oct 18, 2022 · 2 comments

Comments

@mattip
Copy link
Contributor

mattip commented Oct 18, 2022

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
Copy link
Contributor Author

mattip commented Jan 29, 2023

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

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
Copy link
Member

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants