Skip to content

Commit 83aaeb1

Browse files
committed
ci: fix: install versioned pips and versioned distutils
change mongo version to 8 python native venv upgrade wheel and packaging
1 parent 5c33c3a commit 83aaeb1

File tree

3 files changed

+36
-26
lines changed

3 files changed

+36
-26
lines changed

CHANGES.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
## Changelog
2+
23
### 1.9.0
3-
* All: Update `make test` runner to use `pytest` instead of deprecated `setup.py test`
4-
* pytest-profile: add support for `cProfile` regex to filter output
5-
* pytest-profile: update README.md args
4+
* All: Update `make test` runner to use `pytest` instead of deprecated `setup.py test`
5+
* pytest-server-fixtures: Update deprecated mongo 7.* to 8.2
6+
* pytest-profile: add support for `cProfile` regex to filter output
7+
* pytest-profile: update README.md args
8+
* ci: fix py3.7-3.13 ubuntu
9+
* ci: Update support in tests for py3.7-13 for ubuntu 22.04
610

711
### 1.8.1 (2024-11-29)
812
* All: Add a CircleCI Windows build with py3.6-py3.12 and remove references to TravisCI. (#246)

install.sh

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,33 @@ function install_python_ppa {
2828
function install_python_packaging {
2929
local py=$1
3030
$py -m pip install --upgrade pip
31-
$py -m pip install --upgrade setuptools
31+
$py -m pip install --upgrade setuptools wheel
32+
$py -m pip install --upgrade packaging
3233
$py -m pip install --upgrade virtualenv
3334
}
3435

3536

3637
function install_python {
3738
local py=$1
38-
sudo apt-get install -y $py $py-dev
39+
sudo apt-get install -y $py
3940
local version=$(echo $py | grep -oP '(?<=python)\d+\.\d+')
40-
41-
if [ "$version" = "3.6" ] || [ "$version" = "3.7" ]; then
42-
sudo apt-get install ${py}-distutils || {
43-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version/get-pip.py | sudo $py
44-
sudo $py -m pip install setuptools
45-
}
46-
elif [ "$version" = "3.10" ] || [ "$version" = "3.11" ] ; then
47-
sudo apt-get install ${py}-distutils
48-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
49-
else
50-
sudo apt-get install ${py}
51-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
52-
fi
41+
case $version in
42+
"3.6" | "3.7" | "3.8" | "3.9" )
43+
sudo apt-get install -y $py-distutils
44+
;;
45+
*)
46+
echo ""
47+
;;
48+
esac
49+
50+
case $version in
51+
"3.6" | "3.7" | "3.8" )
52+
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version/get-pip.py | sudo $py
53+
;;
54+
*)
55+
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
56+
;;
57+
esac
5358
install_python_packaging $py
5459
}
5560

@@ -92,7 +97,7 @@ function install_windows_python() {
9297

9398
function init_venv {
9499
local py=$1
95-
virtualenv venv --python=$py
100+
$py -m virtualenv venv
96101
if [ -f venv/Scripts/activate ]; then
97102
. venv/Scripts/activate
98103
else
@@ -106,11 +111,13 @@ function update_apt_sources {
106111
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | gpg --dearmor -o /usr/share/keyrings/jenkins-archive-keyring.gpg
107112
echo "deb [signed-by=/usr/share/keyrings/jenkins-archive-keyring.gpg] https://pkg.jenkins.io/debian-stable binary/" | tee /etc/apt/sources.list.d/jenkins.list > /dev/null
108113

109-
# Add MongoDB GPG key and repository
110-
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
111-
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
112-
--dearmor
113-
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
114+
MONGODB_MAJOR="8.0"
115+
MONGODB_MINOR="8.2"
116+
curl -fsSL https://www.mongodb.org/static/pgp/server-${MONGODB_MAJOR}.asc | \
117+
gpg -o /usr/share/keyrings/mongodb-server-${MONGODB_MAJOR}.gpg \
118+
--dearmor
119+
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_MAJOR}.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/${MONGODB_MINOR} multiverse" | tee /etc/apt/sources.list.d/mongodb-org-${MONGODB_MINOR}.list
120+
114121

115122
apt install ca-certificates
116123
apt-get update
@@ -145,7 +152,7 @@ function install_jenkins {
145152
}
146153

147154
function install_mongodb {
148-
apt-get install -y mongodb mongodb-server
155+
apt-get install -y mongodb-org
149156
}
150157

151158
function install_apache {

pytest-server-fixtures/pytest_server_fixtures/mongo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def get_args(self, **kwargs):
8989
'--port=%s' % self.port,
9090
'--nounixsocket',
9191
'--syncdelay=0',
92-
'--nojournal',
9392
'--quiet',
9493
]
9594

0 commit comments

Comments
 (0)