EnviDat / ckanext-restricted

CKAN extension for restricting access to resources
GNU Affero General Public License v3.0
7 stars 26 forks source link

Can't install ckanext-restricted using CKAN 2.9.4 #26

Closed JOCKEEY closed 2 years ago

JOCKEEY commented 2 years ago

Hello there,

This extension is what I'm looking for. I'm using Ckan 2.9.4 and I really want to try it but when I attempt to install ckanext-restricted ( pip install ckanext-restricted ) I got a error

(default) ccgeo@ccgeo:~$ pip install ckanext-restricted
Collecting ckanext-restricted
  Downloading ckanext-restricted-0.0.2.tar.gz (13 kB)
Building wheels for collected packages: ckanext-restricted
  Building wheel for ckanext-restricted (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/lib/ckan/default/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-goi1l2p1
       cwd: /tmp/pip-install-huch0oxb/ckanext-restricted/
  Complete output (8 lines):
  /usr/lib/ckan/default/lib/python3.8/site-packages/setuptools/version.py:1: UserWarning: Module ckanext was already imported from /usr/lib/ckan/default/src/ckan/ckanext/__init__.py, but /tmp/pip-install-huch0oxb/ckanext-restricted is being added to sys.path
    import pkg_resources
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for ckanext-restricted
  Running setup.py clean for ckanext-restricted
Failed to build ckanext-restricted
Installing collected packages: ckanext-restricted
    Running setup.py install for ckanext-restricted ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/lib/ckan/default/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-x52la8vn/install-record.txt --single-version-externally-managed --compile --install-headers /usr/lib/ckan/default/include/site/python3.8/ckanext-restricted
         cwd: /tmp/pip-install-huch0oxb/ckanext-restricted/
    Complete output (44 lines):
    /usr/lib/ckan/default/lib/python3.8/site-packages/setuptools/version.py:1: UserWarning: Module ckanext was already imported from /usr/lib/ckan/default/src/ckan/ckanext/__init__.py, but /tmp/pip-install-huch0oxb/ckanext-restricted is being added to sys.path
      import pkg_resources
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/ckanext
    copying ckanext/__init__.py -> build/lib/ckanext
    creating build/lib/ckanext/restricted
    copying ckanext/restricted/plugin.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/logic.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/helpers.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/controller.py -> build/lib/ckanext/restricted
    copying ckanext/restricted/__init__.py -> build/lib/ckanext/restricted
    creating build/lib/ckanext/restricted/tests
    copying ckanext/restricted/tests/test_plugin.py -> build/lib/ckanext/restricted/tests
    copying ckanext/restricted/tests/__init__.py -> build/lib/ckanext/restricted/tests
    running egg_info
    writing ckanext_restricted.egg-info/PKG-INFO
    writing dependency_links to ckanext_restricted.egg-info/dependency_links.txt
    writing entry points to ckanext_restricted.egg-info/entry_points.txt
    writing top-level names to ckanext_restricted.egg-info/top_level.txt
    reading manifest file 'ckanext_restricted.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.json' under directory 'ckanext/restricted'
    warning: no files found matching '*.js' under directory 'ckanext/restricted'
    warning: no files found matching '*.less' under directory 'ckanext/restricted'
    warning: no files found matching '*.mo' under directory 'ckanext/restricted'
    writing manifest file 'ckanext_restricted.egg-info/SOURCES.txt'
    creating build/lib/ckanext/restricted/public
    copying ckanext/restricted/public/restricted_theme.css -> build/lib/ckanext/restricted/public
    creating build/lib/ckanext/restricted/templates
    copying ckanext/restricted/templates/base.html -> build/lib/ckanext/restricted/templates
    creating build/lib/ckanext/restricted/templates/package
    creating build/lib/ckanext/restricted/templates/package/snippets
    copying ckanext/restricted/templates/package/snippets/resource_item.html -> build/lib/ckanext/restricted/templates/package/snippets
    creating build/lib/ckanext/restricted/templates/restricted
    copying ckanext/restricted/templates/restricted/restricted_request_access_base.html -> build/lib/ckanext/restricted/templates/restricted
    copying ckanext/restricted/templates/restricted/restricted_request_access_form.html -> build/lib/ckanext/restricted/templates/restricted
    copying ckanext/restricted/templates/restricted/restricted_request_access_result.html -> build/lib/ckanext/restricted/templates/restricted
    running install_lib
    creating /usr/lib/ckan/default/lib/python3.8/site-packages/ckanext
    error: could not create '/usr/lib/ckan/default/lib/python3.8/site-packages/ckanext': Permission denied
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/lib/ckan/default/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-huch0oxb/ckanext-restricted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-x52la8vn/install-record.txt --single-version-externally-managed --compile --install-headers /usr/lib/ckan/default/include/site/python3.8/ckanext-restricted Check the logs for full command output.

Need advice. Thankyou

espona commented 2 years ago

Hello,

That does not sound as an issue from our code. Just a simple google of your error and I got this: https://stackoverflow.com/questions/34819221/why-is-python-setup-py-saying-invalid-command-bdist-wheel-on-travis-ci Are you sure is not that?

Also we are only using this branch https://github.com/EnviDat/ckanext-restricted/tree/optimized , it has slightly different functionality, please try that one.

This extension is used in a system that will be replaced by a new framework and we won't continue maintaining it or giving support. I advise to check if there is a fork that is being updated and place your requests there.

Best, Lucia