Skip to content

Unable to pip install ckan #4271

Closed

Description

@rossjones

CKAN Version if known (or site URL)

2.8.0

$ pip --version
10.0.1

Please describe the expected behaviour

I tried pip install ckan so that my linter would stop complaining (my actual ckan is in a VM) and I expected it to install CKAN.

Please describe the actual behaviour

It appears that requirement-setuptools.txt is not part of the pypi package.

 File "<string>", line 1, in <module>
      File "/private/tmp/pip-install-eaBfYZ/ckan/setup.py", line 31, in <module>
        with open(os.path.join(HERE, 'requirement-setuptools.txt')) as f:
    IOError: [Errno 2] No such file or directory: '/private/tmp/pip-install-eaBfYZ/ckan/requirement-setuptools.txt'

What steps can be taken to reproduce the issue?

Try running pip install ckan

Activity

  1. rossjones commented on Jun 4, 2018

    @rossjones
    ContributorAuthor

    I worked around this by downloading https://files.pythonhosted.org/packages/70/aa/b76a115c256b9cd3ccfe166e04949f0b1dcbde36133025f97535c1a8b942/ckan-2.8.0.tar.gz extracting and tweaking the setup.py to remove the requirement-setuptool check. I might as well have installed from source :(

    It is possible to specify the setup tools dependency in the setup.py instead of a separate file?

  2. self-assigned this
    on Jun 5, 2018
  3. amercader commented on Jun 5, 2018

    @amercader
    Member

    This should do the trick to include the file in the packaged version:

    diff --git a/MANIFEST.in b/MANIFEST.in
    index 37e122f..6f606ae 100644
    --- a/MANIFEST.in
    +++ b/MANIFEST.in
    @@ -19,4 +19,4 @@ include CHANGELOG.txt
     include ckan/migration/migrate.cfg
     include ckan/migration/README
     recursive-include ckan/migration/versions *.sql
    -recursive-include ckan_deb *
    +include requirement-setuptools.txt

    We don't really test installing via pip install ckan but if it helps feel free to send a PR with the change. If I'm not mistaken this won't install the requirements either, what's your use case @rossjones ?

  4. rossjones commented on Jun 6, 2018

    @rossjones
    ContributorAuthor

    PR sent. I have a few particular use-cases:

    • When working in a VM, my editor's linter will not work unless it can import ckan.plugins.toolkit. I'd rather just pip install CKAN so that it be can loaded locally by my editor.

    • When working on an extension, that doesn't require me to make changes to CKAN, I'd rather pip install CKAN rather than do a source install.

    The second case isn't solved by my PR because it involves also having the requirements.txt included so that it can be installed at the same time. But I thought there'd likely need to be a much longer discussion about requirements and didn't want to delay getting my linter working when 2.8.1 is eventually ready.

  5. added a commit that references this issue on Jun 6, 2018
    5a306ed
  6. added a commit that references this issue on Jul 20, 2018
    8f16eb2
  7. added a commit that references this issue on Aug 23, 2019
    d227b55
  8. added 3 commits that reference this issue on Mar 24, 2020
    e4fdd39
    7361588
    2e687b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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