Skip to content

Python 3.8 support #91

@gatiszeiris

Description

@gatiszeiris

Overview

Installing extension CKAN 2.10.1 with Python 3.8 get the following error:

(default) [ckan-user@ckan2-10 ckanext-datapackager]$ pip install -r requirements.txt
Collecting cython (from -r requirements.txt (line 1))
  Obtaining dependency information for cython from https://files.pythonhosted.org/packages/9f/17/26f46b499386a15065e930a160b8b169e49d264aa1d5c2751a7b4a676792/Cython-3.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached Cython-3.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.1 kB)
Requirement already satisfied: cchardet in /usr/lib/ckan/default/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (2.1.7)
Collecting jsonschema==2.6.0 (from -r requirements.txt (line 3))
  Using cached jsonschema-2.6.0-py2.py3-none-any.whl (39 kB)
Collecting python-slugify==1.2.4 (from -r requirements.txt (line 4))
  Using cached python_slugify-1.2.4-py2.py3-none-any.whl (4.7 kB)
Collecting datapackage==1.1.3 (from -r requirements.txt (line 5))
  Using cached datapackage-1.1.3-py2.py3-none-any.whl (82 kB)
Collecting frictionless-ckan-mapper>=1.0.7 (from -r requirements.txt (line 6))
  Using cached frictionless_ckan_mapper-1.0.9-py2.py3-none-any.whl (9.7 kB)
Requirement already satisfied: six in /usr/lib/ckan/default/lib/python3.8/site-packages (from -r requirements.txt (line 7)) (1.16.0)
Collecting Unidecode>=0.04.16 (from python-slugify==1.2.4->-r requirements.txt (line 4))
  Obtaining dependency information for Unidecode>=0.04.16 from https://files.pythonhosted.org/packages/e4/63/7685ef40c65aba621ccd2524a24181bf11f0535ab1fdba47e40738eacff6/Unidecode-1.3.7-py3-none-any.whl.metadata
  Using cached Unidecode-1.3.7-py3-none-any.whl.metadata (13 kB)
Collecting cchardet (from -r requirements.txt (line 2))
  Using cached cchardet-1.1.3.tar.gz (624 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting click<7.0,>=6.7 (from datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached click-6.7-py2.py3-none-any.whl (71 kB)
Collecting jsonpointer<2.0,>=1.10 (from datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached jsonpointer-1.14-py2.py3-none-any.whl (7.4 kB)
Requirement already satisfied: requests<3.0,>=2.8 in /usr/lib/ckan/default/lib/python3.8/site-packages (from datapackage==1.1.3->-r requirements.txt (line 5)) (2.28.1)
Collecting tableschema<2.0,>=1.0.7 (from datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached tableschema-1.20.2-py2.py3-none-any.whl (68 kB)
Collecting tabulator<2.0,>=1.3 (from datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached tabulator-1.53.5-py2.py3-none-any.whl (72 kB)
Collecting unicodecsv<2.0,>=0.14 (from datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached unicodecsv-0.14.1-py3-none-any.whl
Requirement already satisfied: charset-normalizer<3,>=2 in /usr/lib/ckan/default/lib/python3.8/site-packages (from requests<3.0,>=2.8->datapackage==1.1.3->-r requirements.txt (line 5)) (2.0.12)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/ckan/default/lib/python3.8/site-packages (from requests<3.0,>=2.8->datapackage==1.1.3->-r requirements.txt (line 5)) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/ckan/default/lib/python3.8/site-packages (from requests<3.0,>=2.8->datapackage==1.1.3->-r requirements.txt (line 5)) (1.26.9)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/ckan/default/lib/python3.8/site-packages (from requests<3.0,>=2.8->datapackage==1.1.3->-r requirements.txt (line 5)) (2021.10.8)
Collecting cached-property>=1.5 (from tableschema<2.0,>=1.0.7->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Requirement already satisfied: python-dateutil>=2.4 in /usr/lib/ckan/default/lib/python3.8/site-packages (from tableschema<2.0,>=1.0.7->datapackage==1.1.3->-r requirements.txt (line 5)) (2.8.2)
Collecting isodate>=0.5.4 (from tableschema<2.0,>=1.0.7->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB)
Collecting rfc3986>=1.1.0 (from tableschema<2.0,>=1.0.7->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached rfc3986-2.0.0-py2.py3-none-any.whl (31 kB)
Collecting chardet>=3.0 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Obtaining dependency information for chardet>=3.0 from https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl.metadata
  Using cached chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting boto3>=1.9 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Obtaining dependency information for boto3>=1.9 from https://files.pythonhosted.org/packages/1e/3e/827f665b39f95c74d040d4745fdbb9f1097e40ef705fac2ef0eaa3f63f6a/boto3-1.28.55-py3-none-any.whl.metadata
  Using cached boto3-1.28.55-py3-none-any.whl.metadata (6.7 kB)
Collecting ijson>=3.0.3 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Obtaining dependency information for ijson>=3.0.3 from https://files.pythonhosted.org/packages/aa/aa/4552cf271ac94469ebe14f2acb4a38c5ba1bcc0db954f53b9f29408983af/ijson-3.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached ijson-3.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
Collecting jsonlines>=1.1 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Obtaining dependency information for jsonlines>=1.1 from https://files.pythonhosted.org/packages/f8/62/d9ba6323b9202dd2fe166beab8a86d29465c41a0288cbe229fac60c1ab8d/jsonlines-4.0.0-py3-none-any.whl.metadata
  Using cached jsonlines-4.0.0-py3-none-any.whl.metadata (1.6 kB)
Requirement already satisfied: sqlalchemy>=0.9.6 in /usr/lib/ckan/default/lib/python3.8/site-packages (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5)) (1.4.41)
Collecting linear-tsv>=1.0 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached linear_tsv-1.1.0-py3-none-any.whl
Collecting xlrd>=1.0 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
Collecting openpyxl>=2.6 (from tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
Collecting botocore<1.32.0,>=1.31.55 (from boto3>=1.9->tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Obtaining dependency information for botocore<1.32.0,>=1.31.55 from https://files.pythonhosted.org/packages/c4/d1/ae888e6b842a000df98c2815e2a396f5e57ceda722ed7c9eac034070c6bf/botocore-1.31.55-py3-none-any.whl.metadata
  Using cached botocore-1.31.55-py3-none-any.whl.metadata (6.0 kB)
Collecting jmespath<2.0.0,>=0.7.1 (from boto3>=1.9->tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
Collecting s3transfer<0.8.0,>=0.7.0 (from boto3>=1.9->tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Obtaining dependency information for s3transfer<0.8.0,>=0.7.0 from https://files.pythonhosted.org/packages/5a/4b/fec9ce18f8874a96c5061422625ba86c3ee1e6587ccd92ff9f5bf7bd91b2/s3transfer-0.7.0-py3-none-any.whl.metadata
  Using cached s3transfer-0.7.0-py3-none-any.whl.metadata (1.8 kB)
Collecting attrs>=19.2.0 (from jsonlines>=1.1->tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting et-xmlfile (from openpyxl>=2.6->tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5))
  Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: greenlet!=0.4.17 in /usr/lib/ckan/default/lib/python3.8/site-packages (from sqlalchemy>=0.9.6->tabulator<2.0,>=1.3->datapackage==1.1.3->-r requirements.txt (line 5)) (1.1.2)
Using cached Cython-3.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)
Using cached Unidecode-1.3.7-py3-none-any.whl (235 kB)
Using cached boto3-1.28.55-py3-none-any.whl (135 kB)
Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
Using cached ijson-3.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (113 kB)
Using cached jsonlines-4.0.0-py3-none-any.whl (8.7 kB)
Using cached botocore-1.31.55-py3-none-any.whl (11.2 MB)
Using cached s3transfer-0.7.0-py3-none-any.whl (79 kB)
Building wheels for collected packages: cchardet
  Building wheel for cchardet (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cchardet (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [57 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/cchardet
      copying src/cchardet/__init__.py -> build/lib.linux-x86_64-cpython-38/cchardet
      copying src/cchardet/version.py -> build/lib.linux-x86_64-cpython-38/cchardet
      running build_ext
      building 'cchardet._cchardet' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/src
      creating build/temp.linux-x86_64-cpython-38/src/cchardet
      creating build/temp.linux-x86_64-cpython-38/src/ext
      creating build/temp.linux-x86_64-cpython-38/src/ext/libcharsetdetect
      creating build/temp.linux-x86_64-cpython-38/src/ext/libcharsetdetect/mozilla
      creating build/temp.linux-x86_64-cpython-38/src/ext/libcharsetdetect/mozilla/extensions
      creating build/temp.linux-x86_64-cpython-38/src/ext/libcharsetdetect/mozilla/extensions/universalchardet
      creating build/temp.linux-x86_64-cpython-38/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src
      creating build/temp.linux-x86_64-cpython-38/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base
      gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base/ -Isrc/ext/libcharsetdetect/nspr-emu/ -Isrc/ext/libcharsetdetect/ -I/usr/lib/ckan/default/include -I/usr/include/python3.8 -c src/cchardet/_cchardet.cpp -o build/temp.linux-x86_64-cpython-38/src/cchardet/_cchardet.o
      src/cchardet/_cchardet.cpp: In function ‘PyObject* PyInit__cchardet()’:
      src/cchardet/_cchardet.cpp:1991:44: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
         __pyx_type_8cchardet_9_cchardet_Detector.tp_print = 0;
                                                  ^~~~~~~~
      In file included from /usr/include/python3.8/object.h:746,
                       from /usr/include/python3.8/pytime.h:6,
                       from /usr/include/python3.8/Python.h:85,
                       from src/cchardet/_cchardet.cpp:4:
      /usr/include/python3.8/cpython/object.h:260:63: note: declared here
           Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
                                                                     ^
      src/cchardet/_cchardet.cpp:1991:44: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
         __pyx_type_8cchardet_9_cchardet_Detector.tp_print = 0;
                                                  ^~~~~~~~
      In file included from /usr/include/python3.8/object.h:746,
                       from /usr/include/python3.8/pytime.h:6,
                       from /usr/include/python3.8/Python.h:85,
                       from src/cchardet/_cchardet.cpp:4:
      /usr/include/python3.8/cpython/object.h:260:63: note: declared here
           Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
                                                                     ^
      src/cchardet/_cchardet.cpp:1991:44: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
         __pyx_type_8cchardet_9_cchardet_Detector.tp_print = 0;
                                                  ^~~~~~~~
      In file included from /usr/include/python3.8/object.h:746,
                       from /usr/include/python3.8/pytime.h:6,
                       from /usr/include/python3.8/Python.h:85,
                       from src/cchardet/_cchardet.cpp:4:
      /usr/include/python3.8/cpython/object.h:260:63: note: declared here
           Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
                                                                     ^
      src/cchardet/_cchardet.cpp: In function ‘PyObject* __Pyx_PyCFunction_FastCall(PyObject*, PyObject**, Py_ssize_t)’:
      src/cchardet/_cchardet.cpp:2351:69: error: too many arguments to function
           return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
                                                                           ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cchardet
Failed to build cchardet
ERROR: Could not build wheels for cchardet, which is required to install pyproject.toml-based projects
(default) [ckan-user@ckan2-10 ckanext-datapackager]$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions