-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement settings driven download and high level resolver customization
- Loading branch information
Shubh Bapna
committed
Jul 19, 2024
1 parent
1566623
commit c98eaf0
Showing
12 changed files
with
249 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
packages: | ||
stevedore: | ||
download_source: | ||
url: https://files.pythonhosted.org/packages/e7/c1/b210bf1071c96ecfcd24c2eeb4c828a2a24bf74b38af13896d02203b1eec/stevedore-${version}.tar.gz | ||
destination_filename: stevedore-custom-${version}.tar.gz | ||
resolver_dist: | ||
sdist_server_url: "https://pypi.org/simple" | ||
include_sdist: false | ||
include_wheels: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*- | ||
|
||
# Test to show we can build a single wheel, if the dependencies are | ||
# available. | ||
|
||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
set -x | ||
set -e | ||
set -o pipefail | ||
|
||
# Bootstrap to create the build order file. | ||
OUTDIR="$(dirname "$SCRIPTDIR")/e2e-output" | ||
|
||
# What are we building? | ||
DIST="stevedore" | ||
VERSION="5.2.0" | ||
|
||
# Recreate output directory | ||
rm -rf "$OUTDIR" | ||
mkdir -p "$OUTDIR/build-logs" | ||
|
||
# Set up virtualenv with the CLI and dependencies. | ||
tox -e e2e -n -r | ||
source ".tox/e2e/bin/activate" | ||
pip install e2e/post_build_hook | ||
|
||
# Bootstrap the test project | ||
fromager \ | ||
--sdists-repo="$OUTDIR/sdists-repo" \ | ||
--wheels-repo="$OUTDIR/wheels-repo" \ | ||
--work-dir="$OUTDIR/work-dir" \ | ||
bootstrap "${DIST}==${VERSION}" | ||
|
||
# Remove traces of stevedore | ||
rm "$OUTDIR/wheels-repo/downloads/${DIST}"* | ||
rm "$OUTDIR/sdists-repo/downloads/${DIST}"* | ||
rm -r "$OUTDIR/work-dir/${DIST}"* | ||
|
||
# Rebuild the wheel mirror without stevedore | ||
pypi-mirror create -d "$OUTDIR/wheels-repo/downloads/" -m "$OUTDIR/wheels-repo/simple/" | ||
|
||
# Rebuild the wheel | ||
fromager \ | ||
--log-file="$OUTDIR/build.log" \ | ||
--sdists-repo="$OUTDIR/sdists-repo" \ | ||
--wheels-repo="$OUTDIR/wheels-repo" \ | ||
--work-dir="$OUTDIR/work-dir" \ | ||
--settings-file="$SCRIPTDIR/build_settings.yaml" \ | ||
build "${DIST}" "${VERSION}" "unreachable_url" | ||
|
||
EXPECTED_FILES=" | ||
wheels-repo/build/stevedore-5.2.0-py3-none-any.whl | ||
sdists-repo/downloads/stevedore-custom-5.2.0.tar.gz | ||
sdists-repo/builds/stevedore-5.2.0.tar.gz | ||
sdists-repo/builds/test-output-file.txt | ||
build.log | ||
" | ||
|
||
pass=true | ||
for f in $EXPECTED_FILES; do | ||
if [ ! -f "$OUTDIR/$f" ]; then | ||
echo "FAIL: Did not find $OUTDIR/$f" 1>&2 | ||
pass=false | ||
fi | ||
done | ||
|
||
if $pass; then | ||
if ! grep -q "${DIST}==${VERSION}" $OUTDIR/sdists-repo/builds/test-output-file.txt; then | ||
echo "FAIL: Did not find content in post-build hook output file" 1>&2 | ||
pass=false | ||
fi | ||
fi | ||
|
||
$pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.