Thanks to visit codestin.com
Credit goes to github.com

Skip to content

extras_require in setup.py#5408

Merged
wardi merged 3 commits into
ckan:masterfrom
DataShades:extras-require
May 27, 2020
Merged

extras_require in setup.py#5408
wardi merged 3 commits into
ckan:masterfrom
DataShades:extras-require

Conversation

@smotornyuk
Copy link
Copy Markdown
Member

@smotornyuk smotornyuk commented May 25, 2020

Allow installation of requirements without any additional actions using pip(fetch requirements.txt, etc).
For example:

pip install ckan[requirements]
pip install ckan[setuptools,requirements-py2]
pip install ckan[requirements,dev]

For testing, try to use my fork:

pip install -e "git+https://github.com/DataShades/ckan.git@extras-require#egg=ckan[requirements,dev]"

@wardi
Copy link
Copy Markdown
Contributor

wardi commented May 25, 2020

does this break later upgrading any dependencies the way install_requires does?

@smotornyuk
Copy link
Copy Markdown
Member Author

Just checked it - no, if some other package will override dependencies specified in CKAN's extras_require, no errors will be produced. So it behaves more like requirements file

Comment thread setup.py Outdated
('setuptools', 'requirement-setuptools.txt'), ('dev', 'dev-requirements.txt'),
]
for group, filepath in _extras_groups:
with open(filepath, 'r') as f:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assumes you're running setup.py from the same working directory. better to use the path of the current module to be safe

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I'm usually using pip install -e ... which implicitly changes directory to the package root before installation, so I didn't notice the problem, even though I've installed it from outside of CKAN's repo.

@wardi wardi merged commit 96c552d into ckan:master May 27, 2020
amercader added a commit that referenced this pull request Nov 10, 2020
Fixes #5726

This was missing from #5408, which allows installing the requirements
using pip, but didn't include the actual requirement files in the
published package, causing an exception when running `pip install ckan`
amercader added a commit that referenced this pull request Jan 15, 2021
Fixes #5726

This was missing from #5408, which allows installing the requirements
using pip, but didn't include the actual requirement files in the
published package, causing an exception when running `pip install ckan`
amercader added a commit that referenced this pull request May 14, 2021
Fixes #5726

This was missing from #5408, which allows installing the requirements
using pip, but didn't include the actual requirement files in the
published package, causing an exception when running `pip install ckan`
amercader added a commit that referenced this pull request May 14, 2021
fostermh pushed a commit to cioos-siooc/ckan that referenced this pull request Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants