Skip to content

Commit c01a9b0

Browse files
Merge pull request #46 from memgraph/MG-fix-distutils-errors-import
Fix wrong import path and CI workflow on MacOS and bump version
2 parents 04e7015 + 54288d2 commit c01a9b0

File tree

6 files changed

+57
-29
lines changed

6 files changed

+57
-29
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
build_and_test_ubuntu:
1212
strategy:
1313
matrix:
14-
platform: [ubuntu-18.04]
15-
python_version: ['3.7']
14+
platform: [ubuntu-20.04]
15+
python_version: ['3.8']
1616
mgversion:
1717
- 1.3.0
1818
- 1.4.0
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/cache@v1
2828
with:
2929
path: ~/memgraph
30-
key: cache-memgraph-v${{ matrix.mgversion }}-community-installer-v2
30+
key: cache-memgraph-v${{ matrix.mgversion }}-community-installer-v3
3131
- name: Download Memgraph
3232
if: steps.cache-memgraph-community.outputs.cache-hit != 'true'
3333
run: |
@@ -120,14 +120,18 @@ jobs:
120120
# First make sure python would resolve to the windows native python, not mingw one
121121
echo "C:\msys64\mingw${{ matrix.arch.mingw }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
122122
echo "${{ env.pythonLocation }}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
123+
- name: Print OpenSSL version
124+
shell: msys2 {0}
125+
run: |
126+
openssl version -a
123127
- uses: Vampire/setup-wsl@v1
124128
with:
125-
distribution: Ubuntu-18.04
129+
distribution: Ubuntu-20.04
126130
- name: Download, install and run Memgraph under WSL
127131
shell: wsl-bash {0} # root shell
128132
run: |
129133
mkdir ~/memgraph
130-
curl -L https://download.memgraph.com/memgraph/v${{ env.MG_VERSION }}/ubuntu-18.04/memgraph_${{ env.MG_VERSION }}-1_amd64.deb --output ~/memgraph/memgraph.deb
134+
curl -L https://download.memgraph.com/memgraph/v${{ env.MG_VERSION }}/ubuntu-20.04/memgraph_${{ env.MG_VERSION }}-1_amd64.deb --output ~/memgraph/memgraph.deb
131135
dpkg -i ~/memgraph/memgraph.deb
132136
openssl req -x509 -newkey rsa:4096 -days 3650 -nodes -keyout key.pem -out cert.pem -subj "/C=GB/ST=London/L=London/O=Testing Corp./CN=PymgclientTest"
133137
nohup /usr/lib/memgraph/memgraph --bolt-port 7687 --bolt-cert-file="cert.pem" --bolt-key-file="key.pem" --data-directory="~/memgraph/data" --storage-properties-on-edges=true --storage-snapshot-interval-sec=0 --storage-wal-enabled=false --storage-recover-on-startup=false --storage-snapshot-on-exit=false --telemetry-enabled=false --log-file='' &
@@ -153,6 +157,7 @@ jobs:
153157

154158
build_macos:
155159
strategy:
160+
fail-fast: false
156161
matrix:
157162
platform: [macos-12, macos-11, macos-10.15]
158163
python_version:
@@ -169,21 +174,26 @@ jobs:
169174
- name: Install python and OpenSSL
170175
run: |
171176
brew install python@${{ matrix.python_version }} openssl@1.1
177+
brew link --force --overwrite openssl@1.1
178+
openssl version -a
172179
- name: Manage OpenSSL 3 on ARM machines
173180
if: ${{ contains(matrix.platform, 'ARM64') }}
174-
run: brew install openssl@3
181+
run: |
182+
brew install openssl@3
183+
brew link --force --overwrite openssl@3
184+
openssl version -a
175185
- name: Make used python version default
176186
run: |
177-
brew unlink python@3 && brew link python@${{ matrix.python_version }}
178-
python3 --version
187+
brew unlink python@3 && brew link --force python@${{ matrix.python_version }}
188+
python${{ matrix.python_version }} --version
179189
- name: Install pytest and pyopenssl
180-
run: python3 -m pip install pyopenssl pytest
190+
run: python${{ matrix.python_version }} -m pip install pyopenssl pytest
181191
- name: Build pymgclient
182-
run: python3 setup.py bdist_wheel
192+
run: python${{ matrix.python_version }} setup.py bdist_wheel
183193
- name: Install pymgclient
184-
run: python3 -m pip install -f dist --no-index pymgclient
194+
run: python${{ matrix.python_version }} -m pip install -f dist --no-index pymgclient
185195
- name: Import mgclient to validate installation
186-
run: python3 -c "import mgclient"
196+
run: python${{ matrix.python_version }} -c "import mgclient"
187197
- name: Save artifact name on x86 machines
188198
if: ${{ !contains(matrix.platform, 'ARM64') }}
189199
run: echo "OS_TYPE=${{ matrix.platform }}" >> $GITHUB_ENV

.github/workflows/release.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ jobs:
2626
build_and_test_ubuntu:
2727
strategy:
2828
matrix:
29-
platform: [ubuntu-18.04]
29+
platform: [ubuntu-20.04]
30+
python_version: ['3.8']
3031
mgversion:
3132
- 2.2.0
3233
runs-on: ${{ matrix.platform }}
3334
steps:
34-
- name: Install system dependencies (Ubuntu 18.04)
35+
- name: Install system dependencies (Ubuntu 20.04)
3536
run: |
36-
sudo apt install -y libpython3.7 python3-pip python3-setuptools
37+
sudo apt install -y libpython${{ matrix.python_version }} python3-pip python3-setuptools
3738
python3 -m pip install --upgrade
3839
sudo pip3 install networkx pytest pyopenssl sphinx
3940
mkdir ~/memgraph
40-
curl -L https://download.memgraph.com/memgraph/v${{matrix.mgversion}}/ubuntu-18.04/memgraph_${{matrix.mgversion}}-1_amd64.deb > ~/memgraph/memgraph.deb
41+
curl -L https://download.memgraph.com/memgraph/v${{matrix.mgversion}}/ubuntu-20.04/memgraph_${{matrix.mgversion}}-1_amd64.deb > ~/memgraph/memgraph.deb
4142
sudo ln -s /dev/null /etc/systemd/system/memgraph.service # Prevents Memgraph from starting.
4243
sudo dpkg -i ~/memgraph/memgraph.deb
4344
@@ -111,12 +112,12 @@ jobs:
111112
[ `openssl version -v | cut -d ' ' -f 2` == "${{ github.event.inputs.openssl_1_version }}" ]
112113
- uses: Vampire/setup-wsl@v1
113114
with:
114-
distribution: Ubuntu-18.04
115+
distribution: Ubuntu-20.04
115116
- name: Download, install and run Memgraph under WSL
116117
shell: wsl-bash {0} # root shell
117118
run: |
118119
mkdir ~/memgraph
119-
curl -L https://download.memgraph.com/memgraph/v${{matrix.mgversion}}/ubuntu-18.04/memgraph_${{matrix.mgversion}}-1_amd64.deb --output ~/memgraph/memgraph.deb
120+
curl -L https://download.memgraph.com/memgraph/v${{matrix.mgversion}}/ubuntu-20.04/memgraph_${{matrix.mgversion}}-1_amd64.deb --output ~/memgraph/memgraph.deb
120121
dpkg -i ~/memgraph/memgraph.deb
121122
openssl req -x509 -newkey rsa:4096 -days 3650 -nodes -keyout key.pem -out cert.pem -subj "/C=GB/ST=London/L=London/O=Testing Corp./CN=PymgclientTest"
122123
nohup /usr/lib/memgraph/memgraph --bolt-port 7687 --bolt-cert-file="cert.pem" --bolt-key-file="key.pem" --data-directory="~/memgraph/data" --storage-properties-on-edges=true --storage-snapshot-interval-sec=0 --storage-wal-enabled=false --storage-recover-on-startup=false --storage-snapshot-on-exit=false --telemetry-enabled=false --log-file='' &
@@ -181,16 +182,16 @@ jobs:
181182
[ `openssl version -v | cut -d ' ' -f 2` == "${{ github.event.inputs.openssl_3_version }}" ]
182183
- name: Make used python version default
183184
run: |
184-
brew unlink python@3 && brew link python@${{ matrix.python_version }}
185-
python3 --version
185+
brew unlink python@3 && brew link --force python@${{ matrix.python_version }}
186+
python${{ matrix.python_version }} --version
186187
- name: Install pytest and pyopenssl
187-
run: python3 -m pip install pyopenssl pytest
188+
run: python${{ matrix.python_version }} -m pip install pyopenssl pytest
188189
- name: Build pymgclient
189-
run: python3 setup.py bdist_wheel
190+
run: python${{ matrix.python_version }} setup.py bdist_wheel
190191
- name: Install pymgclient
191-
run: python3 -m pip install -f dist --no-index pymgclient
192+
run: python${{ matrix.python_version }} -m pip install -f dist --no-index pymgclient
192193
- name: Import mgclient to validate installation
193-
run: python3 -c "import mgclient"
194+
run: python${{ matrix.python_version }} -c "import mgclient"
194195
- name: Save artifact name on x86 machines
195196
if: ${{ !contains(matrix.platform, 'ARM64') }}
196197
run: echo "OS_TYPE=${{ matrix.platform }}" >> $GITHUB_ENV

CHANGELOG.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
Changelog
33
=========
44

5+
######
6+
1.3.1
7+
######
8+
9+
10+
******************************
11+
Major Feature and Improvements
12+
******************************
13+
14+
* Use OpenSSL 1.1.1q and 3.0.5 versions for binary packages
15+
16+
*********
17+
Bug Fixes
18+
*********
19+
20+
* Fixed import path of errors from `distutils`
21+
522
######
623
1.3.0
724
######

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
author = "Memgraph Ltd."
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = "1.3.0"
26+
release = "1.3.1"
2727

2828

2929
# -- General configuration ---------------------------------------------------

docs/source/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Build prerequisites
7171
pymgclient is a C wrapper around the `mgclient`_ Memgraph client library. To
7272
build it from you will need:
7373

74-
* Python 3.6 or newer
75-
* Python 3.6 or newer header files
74+
* Python 3.7 or newer
75+
* Python 3.7 or newer header files
7676
* A C compiler supporting C11 standard
7777
* A C++ compiler (it is not used directly, but necessary for CMake to work)
7878
* Preqrequisites of `mgclient`_:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import sys
1919
import configparser
2020
from distutils import log
21-
from distutils.core import DistutilsExecError, DistutilsPlatformError
21+
from distutils.errors import DistutilsExecError, DistutilsPlatformError
2222
from pathlib import Path
2323
from typing import List
2424

@@ -54,7 +54,7 @@
5454

5555
static_openssl = parser.getboolean("build_ext", "static_openssl", fallback=False)
5656

57-
version = os.getenv("PYMGCLIENT_OVERRIDE_VERSION", "1.3.0")
57+
version = os.getenv("PYMGCLIENT_OVERRIDE_VERSION", "1.3.1")
5858

5959

6060
def list_all_files_in_dir(path):

0 commit comments

Comments
 (0)