gpt4 book ai didi

pyproject.toml 忽略 python 文件

转载 作者:行者123 更新时间:2023-12-03 08:03:46 27 4
gpt4 key购买 nike

src(mlm) 目录下的 python 文件将被忽略。我已将 mlm 目录包含在 where 中以查找包。

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"


[project]
name = "arichuvadi"
version = "0.0.3"
authors = [
{ name="vanangamudi", email="<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="13607475617670756053747e727a7f3d707c7e" rel="noreferrer noopener nofollow">[email protected]</a>" },
]
description = "a basic set of tools to work with Tamil text"
readme = "YENNAI_PADI.txt"
license = { file="LICENSE" }
requires-python = ">=3.5"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]

[project.urls]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"] # ["."] by default
include = ["*.py"] # ["*"] by default
exclude = [] # empty by default
namespaces = true # true by default

这是项目的目录布局

(arichuvadi)$ tree
.
├── LICENSE
├── MANIFEST.in
├── src
│   ├── arichuvadi.py
│   ├── orunguri-tha.py
│   ├── tharavu
│   │   ├── adaiyalamitta-ari.txt
│   │   ├── ari.txt
│   │   └── ari-uni.txt
│   └── valam.py
├── pyproject.toml
├── README.org -> YENNAI_PADI.txt
├── setup.py
└── YENNAI_PADI.txt

最佳答案

由于缺少 __init__.py,您的 src 目录根本不包含 python 包(或模块)。你应该得到这样的结果:

.
├── LICENSE
├── MANIFEST.in
├── src
│ ├── my_actual_package_name
│ | ├── __init__.py
│ │ ├── arichuvadi.py
│ │ ├── orunguri-tha.py
│ │ ├── tharavu
│ │ │ ├── adaiyalamitta-ari.txt
│ │ │ ├── ari.txt
│ │ │ └── ari-uni.txt
│ │ └── valam.py
├── pyproject.toml
├── README.org -> YENNAI_PADI.txt
├── setup.py
└── YENNAI_PADI.txt

如果您想在包中包含 txt 文件,您还应该确保设置 package_data 配置。

关于pyproject.toml 忽略 python 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73118840/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com