Repository: eoyilmaz/displaycal-py3 (language: python)

Issue:
Copying C-Extensions no longer works with python 3.10.6 in test workflow
distutils module should be replaced by setuptools


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index f6560adc..a2c815f0 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Here is a screenshots showing the tool working with Python 3.10:
 
 ![image](https://user-images.githubusercontent.com/1786804/169152229-e06ff549-55fe-4149-8742-405446e6b01f.png)
 
-Currently, DisplayCAL is working with Python 3.8, 3.9 and 3.10 and wxPython 4.1.1.
+Currently, DisplayCAL is working with Python 3.8, 3.9 and 3.10 and wxPython 4.1.1 or 4.2.0.
 
 Here is a list of things that is working:
 


Test patch:
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml
index 3ae40dda..c551cd33 100644
--- a/.github/workflows/pytest.yml
+++ b/.github/workflows/pytest.yml
@@ -28,7 +28,13 @@ jobs:
         echo "py_version=$(echo ${{ matrix.python-version }} | tr -d .)" >> $GITHUB_ENV
         if [[ ${{ matrix.wx-version }} == "4.1.1" ]]; then   echo "wx_url=wxpython.p5k.org/wxPython-4.1.1"; fi >> $GITHUB_ENV
         if [[ ${{ matrix.wx-version }} == "4.2.0" ]]; then   echo "wx_url=extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/wxPython-4.2.0"; fi >> $GITHUB_ENV
-
+        if [ "${{ matrix.python-version }}" == "3.8" ]; then
+          echo "add_dir_str=${{ matrix.python-version }}" >> $GITHUB_ENV
+        elif [ "${{ matrix.python-version }}" == "3.9" ]; then
+          echo "add_dir_str=${{ matrix.python-version }}" >> $GITHUB_ENV
+        elif [ "${{ matrix.python-version }}" == "3.10" ]; then
+          echo "add_dir_str=cpython-310" >> $GITHUB_ENV
+        fi
 
     - name: Setup timezone
       uses: zcong1993/setup-timezone@master
@@ -76,7 +82,7 @@ jobs:
       run: |
         sudo chmod a+rw /etc/udev/rules.d
         python3 setup.py install
-        cp ./build/lib.linux-x86_64-${{ matrix.python-version }}/DisplayCAL/lib64/python${{ env.py_version }}/RealDisplaySizeMM.cpython-${{ env.py_version }}-x86_64-linux-gnu.so ./DisplayCAL/lib64/python${{ env.py_version }}/
+        cp ./build/lib.linux-x86_64-${{ env.add_dir_str }}/DisplayCAL/lib64/python${{ env.py_version }}/RealDisplaySizeMM.cpython-${{ env.py_version }}-x86_64-linux-gnu.so ./DisplayCAL/lib64/python${{ env.py_version }}/
 
     - name: Test with pytest
       run: |