modify: pack_directory add packager_name arg
This commit is contained in:
parent
07c2a5bf8f
commit
ac766a79b6
@ -14,6 +14,11 @@ url = "https://pypi.tuna.tsinghua.edu.cn/simple"
|
||||
build-backend = "hatchling.build"
|
||||
requires = ["hatchling"]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"twine>=4.0.2",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/module_bank"]
|
||||
|
||||
|
||||
@ -15,12 +15,14 @@ class PythonToSQLite:
|
||||
def pack_directory(
|
||||
self,
|
||||
directory_path: str,
|
||||
package_name: str = None,
|
||||
include_patterns: List[str] = None,
|
||||
exclude_patterns: List[str] = None,
|
||||
):
|
||||
"""打包整个目录 - 修复版"""
|
||||
directory = Path(directory_path)
|
||||
package_name = directory.name # 包名
|
||||
if package_name is None:
|
||||
package_name = directory.name # 包名
|
||||
|
||||
if include_patterns is None:
|
||||
include_patterns = ["*.py"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user