Our current setup is this:
repo_1repo_2components_repo
repo_1 and repo_2 both need to make use of the components from the component_repo and all 3 repo's are in Github.
The component_repo folder structure is like this:
.
├── README.md
└── src
├── setup.py
├── folder_1
│ ├── functions.py
├── folder_2
│ ├── functions.py
So I looked into "installing" this component_repo and found these docs:
So as I understand, it will do a
git clone, then build withsetup.pyand then remove the cloned repo. But it's failing at step 2 and not completing the final step (I think).Admittedly, I still don't quite understand what needs to be used for
#egg=but I do know, if I exclude#egg=[whatever]from the command, then I get this error:ERROR: Could not detect requirement name for 'git https://$GITHUB_USER:[email protected]/$GITHUB_USER/components.git@main', please specify one with #egg=your_package_name
I figured that with using the
&subdirectory=srcin the command, I am specifying the location of thesetup.pyfile, but it turns out, that's not the case.So I thought I would move the
setup.pyfile one directory up, to be in the root directory instead, and lo and behold, it works. I did need to update the paths inside thesetup.pyfile for it to work (since I am one directory higher), but it worked.CodePudding user response:
Depending on your shell, you might need to add double quotes around that URL, otherwise
#and/or&might be interpreted by the shell:python -m pip install -e "git https://$GITHUB_USER:[email protected]/$GITHUB_USER/components.git@main#egg=common&subdirectory=src"
