[英]setup.py - metadata-generation-failed
因此,在空閑時間進行了幾周的編碼后,我決定將我的第一個 package發布到 PYPI。
我按照我在 Medium 上找到的關於如何發布到PYPI和創建setup.py
的良好指南進行操作我無法安裝它。 安裝腳本給出以下錯誤:
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-n98_mli9/gisterical_9bbb85fbb9174141b0879737b7b585c1/setup.py", line 7, in <module>
long_description = (here / "readme.md").read_text(encoding="utf-8")
File "/usr/lib64/python3.10/pathlib.py", line 1134, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/usr/lib64/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-n98_mli9/gisterical_9bbb85fbb9174141b0879737b7b585c1/readme.md'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
我不完全確定我哪里出錯了。 這是我的setup.py
from setuptools import setup, find_packages
import pathlib
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / "readme.md").read_text(encoding="utf-8")
setup(
name='GISterical',
version='0.5.3',
license='MIT',
author="Pavel Cherepanskiy",
author_email='pavelcherepansky@gmail.com',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/pavelcherepan/gisterical',
long_description=long_description,
long_description_content_type="text/markdown",
keywords='example project',
classifiers=[
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
],
python_requires=">=3.9, <4",
install_requires=[
'loguru',
'SQLAlchemy>=1.4',
'GeoAlchemy2>=0.12',
'exif',
'attrs',
'ImageHash',
'Pillow',
'psycopg2-binary>=2.8'
],
entry_points={
"console_scripts": [
"gisterical=gisterical:gisterical",
],
},
)
還有我的setup.cfg
[metadata]
description-file=readme.md
license_files=LICENSE.rst
我真的不明白readme.md
的問題是什么,因為它在 PYPI 項目頁面上正確顯示。
您忘記將readme.md
添加為數據文件。 請注意,僅自動包含README*
文件。 將您的readme.md
文件重命名為README.md
或使用MANIFEST.in
將其添加為數據文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.