-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1433 from timkpaine/cisdist
add some light sdist tests and upload sdist in CI
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2021, the Perspective Authors. | ||
# | ||
# This file is part of the Perspective library, distributed under the terms of | ||
# the Apache License 2.0. The full license can be found in the LICENSE file. | ||
set -e | ||
|
||
SDIST_NAME=perspective-python | ||
SDIST_VERSION=`git describe --abbrev=0 --tags | cut -c2-` | ||
SDIST_FULL_NAME=$SDIST_NAME-$SDIST_VERSION | ||
SDIST_FULL_NAME_TAR=$SDIST_FULL_NAME.tar.gz | ||
|
||
# Remove build assets | ||
rm -rf perspective/table/*.{so,dll} | ||
|
||
# Run sdist | ||
echo "-----------------------" | ||
echo "Building sdist" | ||
|
||
python3 setup.py sdist | ||
|
||
# Extract the sdist | ||
echo "-----------------------" | ||
echo "Extracting built sdist" | ||
|
||
mkdir tmp && tar xfzv ./dist/$SDIST_FULL_NAME_TAR -C ./tmp | ||
|
||
# build the sdisted assets | ||
echo "-----------------------" | ||
echo "Building extracted sdist" | ||
|
||
cd tmp/$SDIST_FULL_NAME && python3 setup.py build | ||
|
||
# try to import the libs | ||
echo "-----------------------" | ||
echo "Testing sdist-built assets" | ||
|
||
python3 -c "import perspective;print(perspective.is_libpsp())" | ||
|
||
echo "-----------------------" | ||
echo "Done.." |
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