小编a.c*_*vit的帖子

构建python包找不到requirements.txt

这是我第一次必须在我实际工作的仓库中使用旧 git 存储库的内容。我决定尝试创建一个 Python 包,将其作为库导入到新版本中(我使用的是 gitlab)。

\n

我已经搜索了相关信息来做到这一点,但很难找到一致的解决方案。

\n

我首先尝试通过执行以下命令在本地构建包:

\n

python setup.py bdist_wheel

\n

进而:

\n

python3 -m build

\n

该包应该构建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)

python build setuptools package pypi

0
推荐指数
1
解决办法
548
查看次数

标签 统计

build ×1

package ×1

pypi ×1

python ×1

setuptools ×1