WFP-VAM / DataBridgesAPI

VAM DataBridges API client (WFP API Gateway)
2 stars 2 forks source link

Metadata inconsistency during pip installation process #11

Open AlexGherardelli opened 8 months ago

AlexGherardelli commented 8 months ago

Installing it with command pip install pip@git+https://github.com/WFP-VAM/DataBridgesAPI result in error (see log):

Collecting pip@ git+https://github.com/WFP-VAM/DataBridgesAPI
  Cloning https://github.com/WFP-VAM/DataBridgesAPI to c:\users\alessandra.gherardel\appdata\local\temp\pip-install-_8ayfm8h\pip_c893ebad5a2a43b6ba81ef1d1b9d608e
  Resolved https://github.com/WFP-VAM/DataBridgesAPI to commit 7d82d71eee5fd9e4a9bbe0899a6be29ccd547204
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Discarding git+https://github.com/WFP-VAM/DataBridgesAPI: Requested databridgesapi from git+https://github.com/WFP-VAM/DataBridgesAPI has inconsistent name: expected 'pip', but metadata has 'databridgesapi'
mcarans commented 4 months ago

@ValerioGiuffrida

I ran into this too. In my pyproject.toml, to have this library be an optional dependency, I had to include it like this:

[project.optional-dependencies]
wfp = ["data-bridges-client@git+https://github.com/WFP-VAM/DataBridgesAPI@dev#egg=data-bridges-client"]

In a requirements.txt file, it looks like this: data-bridges-client@git+https://github.com/WFP-VAM/DataBridgesAPI@dev

paololucchino commented 4 months ago

Hi @mcarans, please note that the former dev branch has now been merged and tagged here https://github.com/WFP-VAM/DataBridgesAPI/releases/tag/v2.0.0. This will require some minor changes to your pyproject.toml and requirements.txt.

@AlexGherardelli the release link details installation instructions. This should fix the issues you reported, and we should be able to close this issue.

mcarans commented 4 months ago

@paololucchino Please can you make a release to pypi as it is not possible to use GitHub dependencies in libraries.