python文件在src(mlm)目录下被忽略。我已经将mlm目录包含在where中,以查找包。
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "arichuvadi"
version = "0.0.3"
authors = [
{ name="vanangamudi", email="sgfrecfs@gmail.com" },
]
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发布于 2022-07-30 12:42:04
由于缺少src,您的__init__.py目录根本不包含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配置。
https://stackoverflow.com/questions/73118840
复制相似问题