Skip to content

Commit 161e446

Browse files
authored
Merge pull request #2054 from apache/chore/more_install_checks
Improve build + dist install checks
2 parents 42bf483 + abda09e commit 161e446

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
[build-system]
1717
requires = [
18-
"setuptools~=70.1.1",
19-
"wheel~=0.43.0"
18+
"setuptools~=75.3.0",
19+
"wheel~=0.45.1"
2020
]
2121
build-backend = "setuptools.build_meta"
2222

scripts/dist_install_check.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818
set -e
1919

2020
function cleanup() {
21-
rm -f dist/apache*libcloud*.*
21+
rm -rf dist/apache*libcloud*.*
22+
pip uninstall -y apache-libcloud || true
2223
}
2324

2425
cleanup
2526

2627
trap cleanup EXIT
2728

28-
# Verify library installs without any dependencies when using python setup.py
29-
# install
29+
# Verify library installs without any dependencies when using source
30+
# tarball
3031
echo "Running dist install checks"
3132
python --version
3233

@@ -37,9 +38,14 @@ pip show typing && exit 1
3738
pip show enum34 && exit 1
3839
pip show apache-libcloud && exit 1
3940

40-
# Install the library
41-
pip install .
41+
# Build and install the library
42+
pip install build
43+
python -m build
44+
pip install dist/apache_libcloud-*.tar.gz
45+
46+
# Verify the library has been installed and perform basic sanity check
4247
pip show apache-libcloud
48+
python -c "import libcloud; print(libcloud.__version__)"
4349

4450
# Verify all dependencies were installed
4551
pip show requests

scripts/dist_wheel_install_check.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
set -e
2121

2222
function cleanup() {
23-
rm -f dist/apache*libcloud*.*
23+
rm -rf dist/apache*libcloud*.*
24+
pip uninstall -y apache-libcloud || true
2425
}
2526

2627
cleanup
@@ -42,6 +43,10 @@ pip install build
4243
python -m build
4344
pip install dist/apache_libcloud-*.whl
4445

46+
# Verify the library has been installed and perform basic sanity check
47+
pip show apache-libcloud
48+
python -c "import libcloud; print(libcloud.__version__)"
49+
4550
# Verify all dependencies were installed
4651
pip show requests
4752
pip show typing && exit 1

0 commit comments

Comments
 (0)