[MRG+1] Add optional external dependencies to extras_require #1345

Open
wants to merge 1 commit into
from

Projects

None yet

3 participants

@barraponto
Contributor

Having the external dependencies in extras_require would be useful to raise
awareness of our optional features, let projects that depend on those features
declare it in the proper syntax (like scrapy[JMESpath]) and have us thinking
twice before adding more of those.

@nramirezuy nramirezuy changed the title from Add optional external dependencies to extras_require to [MRG+1] Add optional external dependencies to extras_require Jul 13, 2015
@kmike
Member
kmike commented Jul 29, 2015

I'm not sure if we need this kind granularity.
For example, if we will ever want to remove JMESPath for some reason, we'll have to keep 'JMESPath' in extras_require because if users have scrapy[JMESPath] in their requirements.txt installation will start to fail. I think it is better to name extra requirements after Scrapy features which are enabled by them, like you've done with scrapy[s3]. E.g. scrapy[shell] can install IPython, etc.

Another option is to just add scrapy[full] extra requirement which will install all optional dependencies.

@barraponto
Contributor

@kmike if we no longer need the jmespath package to support jmespath, then we can declare an empty set of requirements. if we drop the jmespath feature at all, then it's up to the package depending on it to update its dependencies.

@kmike
Member
kmike commented Jul 30, 2015

@barraponto you're right there are ways to deal with it. But what's an advantage of writing pip install scrapy[jmespath] instead of pip install scrapy jmespath?

@barraponto
Contributor

That is just because jmespath is both a feature name and a package name. But should the dependencies for that feature change (adding or removing packages), projects depending on scrapy[jmespath] should still work.

@nramirezuy
Member

@kmike We have control over the version installed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment