piskvorky / gensim

Topic Modelling for Humans
https://radimrehurek.com/gensim
GNU Lesser General Public License v2.1
15.59k stars 4.37k forks source link

scipy probably not needed in [build-system.requires] table #3536

Closed filip-komarzyniec closed 2 months ago

filip-komarzyniec commented 3 months ago

Problem description

I believe that specifying scipy as a build-only dependency is unnecessary.

Pip builds the library in isolated environment (by default) where it first downloads (and alternatively builds) build-only dependencies. This behaviour creates additional problems for architectures for which there are not many .whl distributions, like e.g. ppc64le.

Steps/code/corpus to reproduce

1) create an environment where there is already an older scipy library version installed

2)

cd gensim/
pip install . 

3) As there is no gensim .whl distribution for ppc64le, pip will try building gensim in a new isolated environment with build-only dependencies. As there is no scipy .whl distribution for ppc64le either, pip will try building that as well. Despite the fact that scipy is already installed in desired version within the target environment. Not only there will be a scipy version mismatch (pip will be building the latest version in the isolated environment) but it will also:

Desired resolution

I've tested locally installing gensim with modified pyproject.toml file (deleted scipy) and it works as expected. Is there any other logic that does not allow deleting scipy as a build-only dependency?

Versions

gensim>4.3.*

mpenkov commented 3 months ago

Are you interested in making a PR @filip-komarzyniec ?

filip-komarzyniec commented 3 months ago

Sure, I'll be happy to, thanks! I'll issue it shortly