NNPDF / pineappl

PineAPPL is not an extension of APPLgrid
https://nnpdf.github.io/pineappl/
GNU General Public License v3.0
12 stars 3 forks source link

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

Closed alecandido closed 6 days ago

alecandido commented 6 days ago

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.

cschwan commented 6 days ago

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 commented 6 days ago

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 commented 6 days ago

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 :smile:.