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

Make the CLI and extra dependency of the Python package #295

Merged
merged 2 commits into from
Jun 30, 2024
Merged

Conversation

alecandido
Copy link
Member

This is a tiny consequence of #266, just to simplify the installation.

It will cause an overhead, but I'd assume that most people running

pip install pineappl

would like to have the CLI as well.

@alecandido alecandido requested a review from cschwan June 29, 2024 15:18
@cschwan
Copy link
Contributor

cschwan commented Jun 30, 2024

I don't think this is a good idea:

  1. the Python interface doesn't depend on the CLI in the strict sense
  2. on Windows this will lead to an error because there's a Python interface, but no CLI.

It's not a dependency, but rather a recommended/suggested package. I don't know if Python has a concept for those.

@alecandido
Copy link
Member Author

alecandido commented Jun 30, 2024

It's not a dependency, but rather a recommended/suggested package. I don't know if Python has a concept for those.

There are extras, such that you can install it as:

pip install pineappl[cli]

the Python interface doesn't depend on the CLI in the strict sense

True, but it's convenient to install them together. The main motivation to avoid is for dependent packages, not for end-users.
Unfortunately, the missing bit in Python, which would be convenient in this case, are default extras (default features in Rust, as it is often std).

on Windows this will lead to an error because there's a Python interface, but no CLI.

This would not be a problem. Dependencies can be specified as platform-dependent, and we could exclude Windows (until there will be a released wheel for that as well).

@cschwan
Copy link
Contributor

cschwan commented Jun 30, 2024

It's not a dependency, but rather a recommended/suggested package. I don't know if Python has a concept for those.

There are extras, such that you can install it as:

pip install pineappl[cli]

Aah yes, that's perfect!

the Python interface doesn't depend on the CLI in the strict sense

True, but it's convenient to install them together. The main motivation to avoid is for dependent packages, not for end-users. Unfortunately, the missing bit in Python, which would be convenient in this case, are default extras (default features in Rust, as it is often std).

Yes I agree. In general I hate unnecessary dependencies, and it would be unfair to force those users to install something they didn't ask for. So having the CLI as an extra is a good compromise!

on Windows this will lead to an error because there's a Python interface, but no CLI.

This would not be a problem. Dependencies can be specified as platform-dependent, and we could exclude Windows (until there will be a released wheel for that as well).

For the time being I suppose we can leave everything as is, if someone complains we know we have Windows users 😄.

@cschwan cschwan changed the title Make PineAPPLpy depending on the CLI package Make the CLI and extra dependency of the Python package Jun 30, 2024
@alecandido alecandido merged commit 228cf66 into master Jun 30, 2024
9 checks passed
@alecandido alecandido deleted the py-deps branch June 30, 2024 10:26
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