Questions tagged «python-packaging»



2
如何在不使用setup.py文件的情况下构建源分发?
具有以下封装结构 . ├── my_package │ └── __init__.py ├── setup.cfg └── setup.py 内容 setup.py from setuptools import setup setup() 内容 setup.cfg [metadata] name = my_package version = 0.1 [options] packages = find: 我可以my_package像这样构建轮子或源代码分布 pip wheel --no-deps -w dist . # generates file ./dist/my_package-0.1-py3-none-any.whl python setup.py sdist # generates file ./dist/my_package-0.1.tar.gz 但是据setuptools的维护者说,声明式构建配置是理想的选择,而使用命令式构建将成为代码的味道。因此,我们替换setup.py为pyproject.toml: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.