Repository: ColdHeat/pybluemonday (language: python)

Issue:
error: subprocess-exited-with-error
```
Collecting pybluemonday
  Using cached pybluemonday-0.0.9.tar.gz (8.4 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cffi~=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from pybluemonday) (1.15.1)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi~=1.1->pybluemonday) (2.21)
Building wheels for collected packages: pybluemonday
  Building wheel for pybluemonday (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      uname_result(system='Darwin', node='mbp-van-julian.wifi.hu.nl', release='22.1.0', version='Darwin Kernel Version 22.1.0: Tue Sep 13 21:11:40 PDT 2022; root:xnu-8792.40.101.181.2~2/RELEASE_ARM64_T6000', machine='arm64')
      sh: ./scripts/setup-macos.sh: No such file or directory
      make: *** No rule to make target `clean'.  Stop.
      make: *** No rule to make target `so'.  Stop.
      Requirement already satisfied: cffi~=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (1.15.1)
      Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi~=1.1) (2.21)
      make: *** No rule to make target `ffi'.  Stop.
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-310
      creating build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/test_memory_leaks.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      creating build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      copying pybluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_policies.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      running build_ext
      $ GOPATH=/var/folders/_w/82v6x9j9373gjblnbh6_bfnh0000gn/T/tmpj5viix0p go get -d
      error: [Errno 2] No such file or directory: 'go'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pybluemonday
  Running setup.py clean for pybluemonday
Failed to build pybluemonday
Installing collected packages: pybluemonday
  Running setup.py install for pybluemonday ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pybluemonday did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      uname_result(system='Darwin', node='mbp-van-julian.wifi.hu.nl', release='22.1.0', version='Darwin Kernel Version 22.1.0: Tue Sep 13 21:11:40 PDT 2022; root:xnu-8792.40.101.181.2~2/RELEASE_ARM64_T6000', machine='arm64')
      sh: ./scripts/setup-macos.sh: No such file or directory
      make: *** No rule to make target `clean'.  Stop.
      make: *** No rule to make target `so'.  Stop.
      Requirement already satisfied: cffi~=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (1.15.1)
      Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi~=1.1) (2.21)
      make: *** No rule to make target `ffi'.  Stop.
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-310
      creating build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      copying tests/test_memory_leaks.py -> build/lib.macosx-10.9-universal2-cpython-310/tests
      creating build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      copying pybluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/pybluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_policies.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      copying tests/bluemonday/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/bluemonday
      creating build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/__init__.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      copying tests/html_sanitizer/test_sanitize.py -> build/lib.macosx-10.9-universal2-cpython-310/tests/html_sanitizer
      running build_ext
      $ GOPATH=/var/folders/_w/82v6x9j9373gjblnbh6_bfnh0000gn/T/tmpee6ov1kr go get -d
      error: [Errno 2] No such file or directory: 'go'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pybluemonday

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```


Discussion / hints:
I imagine this is from an Apple Silicon Mac? You will need to have go available to build pybluemonday if the published wheels aren't working. 
 Apple Silicon Mac, yes i have
 
 ahw right, an how do i do that with that go thing?
I have installed Go to my MacBook but there is still the same error!

Fix patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7e7105f..3a42c2a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,16 +23,16 @@ jobs:
         with:
           python-version: '3.7'
 
-      - name: Install dependencies
+      - name: Install Python dependencies
         run: |
           python -m pip install --upgrade -r development.txt
 
-      - name: Install Visual C++ for Python 2.7
+      - name: Install Windows dependencies
         if: runner.os == 'Windows'
         run: |
-          choco install vcpython27 -f -y
           choco install golang -f -y
           choco install mingw -f -y
+          pip install --force cibuildwheel==2.3.1
           go get -d
 
       - name: Set up QEMU
@@ -42,7 +42,7 @@ jobs:
       - name: Build Linux wheels and sdist
         if: runner.os == 'Linux'
         env:
-          CIBW_SKIP: "cp35-* *-win32 *-musllinux_i686 *-musllinux_aarch64 *-musllinux_ppc64le *-musllinux_s390x *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x"
+          CIBW_SKIP: "cp35-* cp36-* *-win32 *-musllinux_i686 *-musllinux_aarch64 *-musllinux_ppc64le *-musllinux_s390x *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x"
           CIBW_BUILD_VERBOSITY: 1
         run: |
           python setup.py sdist
@@ -67,15 +67,16 @@ jobs:
       - name: Build macOS wheels
         if: runner.os == 'macOS'
         env:
-          CIBW_SKIP: "cp35-* *-win32 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x"
+          CIBW_SKIP: "cp35-* cp36-* *-win32 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x"
           CIBW_BUILD_VERBOSITY: 1
+          CIBW_ARCHS_MACOS: x86_64 arm64
         run: |
           python3 -m cibuildwheel --output-dir wheelhouse
 
       - name: Build Windows wheels
         if: runner.os == 'Windows'
         env:
-          CIBW_SKIP: "cp35-* *-win32 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x"
+          CIBW_SKIP: "cp35-* cp36-* *-win32 *-manylinux_i686 *-manylinux_aarch64 *-manylinux_ppc64le *-manylinux_s390x"
           CIBW_BUILD_VERBOSITY: 1
         run: |
           python -m cibuildwheel --output-dir wheelhouse
diff --git a/Dockerfile b/Dockerfile
index 7ea2ab3..faae35b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,3 @@
-FROM python:3.6-slim-buster as py36
-RUN apt-get update && apt-get install -y golang make build-essential libffi-dev git
-WORKDIR /root
-COPY . /root
-RUN python setup.py bdist_wheel
-
-
 FROM python:3.7-slim-buster as py37
 RUN apt-get update && apt-get install -y golang make build-essential libffi-dev git
 WORKDIR /root
diff --git a/development.txt b/development.txt
index d983667..4b9bff2 100644
--- a/development.txt
+++ b/development.txt
@@ -1,9 +1,9 @@
-setuptools-golang==2.3.0
+setuptools-golang==2.7.0
 wheel==0.37.1
 cffi==1.14.5
 black==20.8b1
 isort==5.6.4
-twine==3.1.1
+twine==4.0.2
 pytest==6.2.5
 psutil==5.7.3
-cibuildwheel==2.3.1
+cibuildwheel==2.12.3
diff --git a/setup.py b/setup.py
index 9d96288..1b04f72 100644
--- a/setup.py
+++ b/setup.py
@@ -61,10 +61,10 @@
         "License :: OSI Approved :: MIT License",
         "Operating System :: OS Independent",
     ],
-    python_requires=">=3.6",
+    python_requires=">=3.7",
     # I'm not sure what this value is supposed to be
     build_golang={"root": "github.com/ColdHeat/pybluemonday"},
     ext_modules=[setuptools.Extension("pybluemonday/bluemonday", ["bluemonday.go"])],
-    setup_requires=["setuptools-golang==2.3.0", "cffi~=1.1"],
+    setup_requires=["setuptools-golang==2.7.0", "cffi~=1.1"],
     install_requires=["cffi~=1.1"],
 )


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9b9b6ba..55d284c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -9,7 +9,7 @@ jobs:
 
     strategy:
       matrix:
-        python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
+        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
 
     name: Python ${{ matrix.python-version }}
     steps: