[英]Best way to reuse just a small set of files from another Open-Source project?
image that another Open-Source project on Github provides some parts that I would like to reuse in my project, like图片 Github 上的另一个开源项目提供了一些我想在我的项目中重用的部分,比如
All I need is a small subset of the other project.我所需要的只是另一个项目的一小部分。 Often the scope and functionality of the other project is very far from mine.
通常 scope 和其他项目的功能离我很远。
What will be the best way to organize this from a practical (assuming the legal perspective is covered by the existing license)?从实际情况来看,最好的组织方式是什么(假设现有许可证涵盖法律角度)? Ideally, merging improvements from the upstream repository and sending pull requests for local improvements I create back to the original project would remain possible.
理想情况下,合并来自上游存储库的改进并将我创建的本地改进的拉取请求发送回原始项目仍然是可能的。
a) I could add the other Github repository to the requirements.txt of my project, install it and optionally delete all the parts that I do not need after installation in my installation procedure (setup.py etc.). a) 我可以将另一个 Github 存储库添加到我的项目的 requirements.txt 中,安装它并在我的安装过程(setup.py 等)中删除安装后我不需要的所有部分。 b) I could fork the other Github repository, reduce my fork thereof to the files I need, and add my fork to the requirements of my new project.
b) 我可以 fork 另一个 Github 存储库,将我的 fork 减少到我需要的文件,并将我的 fork 添加到我的新项目的要求中。
I found Linking a single file from another git repository , but his does not really address my needs.我发现Linking a single file from another git repository ,但他并没有真正满足我的需求。
Of course, it is risky to establish a rigid link to the internal organization of another project.当然,与另一个项目的内部组织建立刚性联系是有风险的。 But that is not the issue in here.
但这不是这里的问题。
Any ideas?有任何想法吗?
If you really need to keep a strong link between some files of a repository and your own project repo, I would:如果您确实需要在存储库的某些文件和您自己的项目存储库之间保持强大的链接,我会:
That way:那样:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.