alliedvision / VimbaPython

Old Allied Vision Vimba Python API. The successor to this API is VmbPy
BSD 2-Clause "Simplified" License
93 stars 40 forks source link

VimbaPython wrongly registered as -0.3.0- makes poetry crash #1

Closed stefannae closed 4 years ago

stefannae commented 4 years ago

Here is the output for the installation on an x64 Ubuntu 18.04.4 LTS inside a python 3.7.6 conda env

$ python -m pip install .
Processing /home/user/code/alvium-camera/VimbaPython
Building wheels for collected packages: VimbaPython
  Building wheel for VimbaPython (setup.py) ... done
  Created wheel for VimbaPython: filename=VimbaPython-_0.3.0_-py3-none-any.whl size=76321 sha256=eb348698775d61a3fc9822912f7bc0756e4d0731873f3c74294262a1e71faff1
  Stored in directory: /tmp/pip-ephem-wheel-cache-fh8pg4wy/wheels/64/08/f9/5776929ea5dfcd62957a1b643f071612dbd8e863b4aa9338ca
Successfully built VimbaPython
Installing collected packages: VimbaPython
Successfully installed VimbaPython--0.3.0-

and the package listing

$ pip list
Package     Version            
----------- -------------------
certifi     2019.11.28         
pip         20.0.2             
setuptools  45.2.0.post20200210
VimbaPython -0.3.0-            
wheel       0.34.2 

while accesing the version gives the right answer

$ python -c "import vimba; print(vimba.__version__)"
0.3.0

The version number creates problems when using poetry instead of conda on Jetson TX2 with Ubuntu 18.04.4 LTS inside a python 3.7.6 env. No matter how VimbaPython is installed with or without poetry

$ poetry add git+https://github.com/alliedvision/VimbaPython.git

[ParseVersionError]
Unable to parse "-0.3.0-".

If installed independently inside the poetry project $ poetry show crashes with the same output.

NiklasKroeger-AlliedVision commented 4 years ago

Hi @stefannae

thank you for bringing this to our attention and the thorough explanation! There was a problem in setup.py where we parse the version property of vimba.init.py. The quotation marks were not stripped correctly which lead to the - you see in your installed pip version.

I have created a pull request that fixes this issue. If you want you can use that branch (NiklasKroeger-AlliedVision:fix_VimbaPython_version_string) to start working right now. The changes should however be merged into this main repository shortly.

If you experience any more problems or have ideas for improvement feel free to create a new issue. We are always glad to receive feedback.

Best Regards, -Niklas.

stefannae commented 4 years ago

Thanks @NiklasKroeger-AlliedVision