Open gallexme opened 4 years ago
This is a deep debate and there's no great answer. CKAN community has resolved to use requirements files.
I see we need to add this step to the README:
pip install -r pip-requirements.txt
like other extensions have.
@davidread This would mean changing the entire install approach, not just adding one line.
I am not a Python package expert at all, but isn't the idea when you do pip install ...
that dependencies get installed automatically?
It's true for libraries, but less so for higher level 'projects', composed of lots of libraries.
There have been lots of cases where different CKAN extensions have conflicted in the versions required of their dependencies. If the authors specifies this in setup.py's install_requires, needed for automatic install, then you can't run the software, until you edit the setup.py. Whereas requirements files can be used or ignored. It might not be such a problem these days, with semver and us getting off pylons. It's just what the convention in the CKAN community now. Happy for you to start a discussion on Ckan Ideas to involve everyone.
Given I just had to remove two dependencies from an extension and then add two manually to get it to work (maybe not the best example) I can completely agree.
Then I will see if I can redraft the whole instructions to do the source code install and make a PR?
Yes, I guess step 2 would be better as something like:
pip install -e git+git@github.com:ckan/ckanext-xloader.git#egg=ckanext-xloader
pip install -r /usr/lib/ckan/default/src/ckanext-xloader/requirements.txt
What do you think?
This subject was recently discussed here . This module in particular has two dependencies that can be included in setup.py
without much problem, and it will make setup much easier.
Shouldnt Pip Install the requirements in pip-requirements.txt?