Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra dependencies to recipe #55

Open
jwodder opened this issue Jun 1, 2021 · 8 comments
Open

Add extra dependencies to recipe #55

jwodder opened this issue Jun 1, 2021 · 8 comments

Comments

@jwodder
Copy link
Member

jwodder commented Jun 1, 2021

I am attempting to add a recipe to conda-forge that depends on pydantic with the [email] extra. However, conda does not support extras, and email-validator is not listed as a runtime dependency in pydantic's conda-forge recipe. I would like to request that email-validator (and python-dotenv, for completeness) be added to the runtime dependencies in pydantic's conda-forge recipe so that they will be available to packages that depend on pydantic. (The alternative course of action, in which projects that need extras explicitly list the packages in the extras in their recipes, would shift responsibility for keeping pydantic's dependencies up to date from the maintainers of this recipe to the maintainters of all recipes that depend on pydantic, which seems undesirable.)

@dgasmith
Copy link
Contributor

dgasmith commented Jun 1, 2021

Having a batteries included approach is also undesirable as it can add up to many unused packages and I wouldn't be in favor of extending the current repository since pydantic is lightweight. conda-forge generally takes the x-core/x/x-extras strategy, see dask as an example.

@jwodder
Copy link
Member Author

jwodder commented Jun 1, 2021

@dgasmith Then could you please consider creating a pydantic-email formula that depends on email-validator?

@samuelcolvin
Copy link
Member

Is there no way to install email-validator with conda-forge?

@jwodder
Copy link
Member Author

jwodder commented Jun 1, 2021

@samuelcolvin There is, but if I declare email-validator as an explicit dependency of my package, then, in the event that pydantic ever changes its [email] extra to install a different package or set of packages, I — and all other maintainers of conda-forge packages that explicitly depend on pydantic and email-validator — would have to update our packages' recipes, whereas if there were a pydantic-email recipe, then only a single update would be needed, to that recipe.

@samuelcolvin
Copy link
Member

That would be the same in pypi/pip land and seems extremely unlikely.

I don't think it's sufficient reason to create a new package. Although I guess no one is stopping you creating it...?

@jwodder
Copy link
Member Author

jwodder commented Jun 1, 2021

@samuelcolvin

That would be the same in pypi/pip land and seems extremely unlikely.

No, in pip land, I can declare a dependency on pydantic[email], and I won't have to worry about changes to the [email] spec. There is no built-in equivalent in conda-forge.

@dgasmith
Copy link
Contributor

dgasmith commented Jun 1, 2021

@samuelcolvin conda in general doesn't support optional dependancies (apart from making more packages).

@jwodder I don't have time at the moment to make another recipe, conda-forge is open submission. Happy to review/maintain another package!

@BastianZim
Copy link
Member

Just my two cents: The easiest approach is to create a multi-output recipe like here: https://github.com/conda-forge/sagemaker-inference-toolkit-feedstock/blob/master/recipe/meta.yaml

The package should then be called base-extra and just depend on base + extras without having any content itself.

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

No branches or pull requests

4 participants