clstoulouse / motu-client-python

Motu is a high efficient and robust Web Server which fills the gap between heterogeneous data providers to end users. Motu handles, extracts and transforms oceanographic huge volumes of data without performance collapse. This client enables to extract and download data through a python command line.
GNU Lesser General Public License v3.0
49 stars 22 forks source link

Version incorrectly introduced in PyPI package #16

Closed astrojuanlu closed 5 years ago

astrojuanlu commented 5 years ago

I noticed this while upgrading motuclient to 1.8.2:

$ pip install -U motuclient
Collecting motuclient
  Downloading https://files.pythonhosted.org/packages/e1/97/99135ea297dab83ef5aa57e40b9b15e847972e640a2db9bef85d44f627ee/motuclient-1.8.2.tar.gz
Building wheels for collected packages: motuclient
  Building wheel for motuclient (setup.py) ... done
  Stored in directory: /home/juanlu/.cache/pip/wheels/4b/6a/93/7c698179b27a8afd7f7a78cd76fbbd7a51bbad7123ad94d4d4
Successfully built motuclient
Installing collected packages: motuclient
  Found existing installation: motuclient 1.8.1
    Uninstalling motuclient-1.8.1:
      Successfully uninstalled motuclient-1.8.1
Successfully installed motuclient-Unknown

Even after uninstalling and reinstalling I see the same problem:

$ pip install motuclient==1.8.2
Collecting motuclient==1.8.2
Installing collected packages: motuclient
Successfully installed motuclient-Unknown

I suspect that it has to do with the newer versions of pip:

$ pip --version
pip 19.0.3 from /home/juanlu/.miniconda36/envs/pywekeo37/lib/python3.7/site-packages/pip (python 3.7)

So perhaps you could follow an alternative approach for putting the version in setup.py instead of importing the package itself, as described here:

https://packaging.python.org/guides/single-sourcing-package-version/

clstoulouse commented 5 years ago

Thank for reporting this issue. We will investigate it in the coming days. If you have any solution to fix it, thanks to submit a GitHub pull request. Regards, CLS team.

clstoulouse commented 5 years ago

Hi @Juanlu001 ,

I have tested it and I cannot reproduce it:

python3.7 -m pip install --user motuclient Collecting motuclient Installing collected packages: motuclient Successfully installed motuclient-1.8.2

python3.7 -m pip --version pip 19.1.1 from /home/ubuntu/.local/lib/python3.7/site-packages/pip (python 3.7)

python3.7 --version Python 3.7.3

==================== python3.7 -m pip uninstall motuclient Uninstalling motuclient-1.8.2: Would remove: /home/ubuntu/.local/bin/motuclient /home/ubuntu/.local/lib/python3.7/site-packages/motu-client.py /home/ubuntu/.local/lib/python3.7/site-packages/motu_utils/ /home/ubuntu/.local/lib/python3.7/site-packages/motuclient-1.8.2.dist-info/ /home/ubuntu/.local/lib/python3.7/site-packages/motuclient.py Proceed (y/n)? y Successfully uninstalled motuclient-1.8.2

python3.7 -m pip install --user motuclient==1.8.2 Collecting motuclient==1.8.2 Installing collected packages: motuclient Successfully installed motuclient-1.8.2

Any idea about how I can reproduce it ?

Regards, CLS team

astrojuanlu commented 5 years ago

It's strange, I tried the same pip version and the same motuclient version and I can't reproduce it anymore either. A temporary glitch perhaps? In any case, closing!