Search code examples
pythongitazure-devopspiprequirements.txt

Can I have two Libraries within one Azure Repo and install them using requirements.txt


I have a Repo with two libraries committed. Basically two folder containing different libraries within one single repo. And I want this libraries to be installed using requirements.txt. Is this possible?

django-auth-adfs @ git+https://{username}:{PAT}@dev.azure.com/{organization}/{project}/_git/{repository}/django-auth-adfs@main#egg=django-auth-adfs
django @ git+https://{username}:{PAT}@dev.azure.com/{organization}/{project}/_git/{repository}/django@main#egg=django

I found this command to put within requirements.txt but this throws errors while installing.


Solution

  • Try this in your requirements.txt:

    django-auth-adfs @ git+https://{username}:{PAT}@dev.azure.com/{organization}/{project}/_git/{repository}@main#egg=django-auth-adfs&subdirectory=django-auth-adfs
    
    django @ git+https://{username}:{PAT}@dev.azure.com/{organization}/{project}/_git/{repository}@main#egg=django&&subdirectory=django
    

    See the docs at https://pip.pypa.io/en/stable/topics/vcs-support/