这是我第一次必须在我实际工作的仓库中使用旧 git 存储库的内容。我决定尝试创建一个 Python 包,将其作为库导入到新版本中(我使用的是 gitlab)。
\n我已经搜索了相关信息来做到这一点,但很难找到一致的解决方案。
\n我首先尝试通过执行以下命令在本地构建包:
\npython setup.py bdist_wheel
进而:
\npython3 -m build
该包应该构建wheel的依赖关系,但在尝试查找requirements.txt文件时它崩溃了。
\n我之前看到该命令写入 Egg-info 文件,创建包,并将文件从本地复制到包:
\n(venv) acivit@odin:~/projects/mechanized-number-recognition$ python3 -m build \n* Creating venv isolated environment...\n* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)\n* Getting build dependencies for sdist...\nrunning egg_info\nwriting acivit.mechanized_number_recognition.egg-info/PKG-INFO\nwriting dependency_links to acivit.mechanized_number_recognition.egg-info/dependency_links.txt\nwriting requirements to acivit.mechanized_number_recognition.egg-info/requires.txt\nwriting top-level names to acivit.mechanized_number_recognition.egg-info/top_level.txt\nreading manifest file 'acivit.mechanized_number_recognition.egg-info/SOURCES.txt'\nadding license file 'LICENSE.md'\nwriting manifest file 'acivit.mechanized_number_recognition.egg-info/SOURCES.txt'\n* Building sdist...\nrunning sdist\nrunning egg_info\nwriting acivit.mechanized_number_recognition.egg-info/PKG-INFO\nwriting dependency_links to acivit.mechanized_number_recognition.egg-info/dependency_links.txt\nwriting …Run Code Online (Sandbox Code Playgroud)