Код: Выделить всё
script.py
Код: Выделить всё
root/
│
├── bin/
│ ├── binary1
│ ├── binary2
│ ├── binary3
│ └── binary4
├── script.py
├── pyproject.toml
├── MANIFEST.in
├── README.md
Код: Выделить всё
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
py-modules = ["script"]
[project]
name = "script-test"
description = "Lorem ipsum"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "", email = "[email protected]" },
]
requires-python = ">=3.7"
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux"
]
[tool.setuptools.dynamic]
version = {attr = "script.__version__"}
[tool.setuptools.package-data]
"*" = ["bin/*"]
[project.scripts]
script = "script:main"
Код: Выделить всё
include README.md
include LICENSE
recursive-include bin *
Код: Выделить всё
python -m build
Код: Выделить всё
script_test-0.0.4-py3-none-any.whl
Код: Выделить всё
script_test-0.0.4.tar.gz
Вывод сборки (усеченный):
Код: Выделить всё
* Building wheel...
/private/var/folders/1k/dnrtvbx9445dpk1shw82v9fw0000gn/T/build-env-jgwgjjff/lib/python3.12/site-packages/setuptools/config/expand.py:126: SetuptoolsWarning: File '/private/var/folders/1k/dnrtvbx9445dpk1shw82v9fw0000gn/T/build-via-sdist-l75sfsez/script_test-0.0.4/LICENSE' cannot be found
for path in _filter_existing_files(_filepaths)
running bdist_wheel
running build
running build_py
creating build/lib
copying script.py -> build/lib
running egg_info
writing script_test.egg-info/PKG-INFO
writing dependency_links to script_test.egg-info/dependency_links.txt
writing entry points to script_test.egg-info/entry_points.txt
writing top-level names to script_test.egg-info/top_level.txt
reading manifest file 'script_test.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE'
writing manifest file 'script_test.egg-info/SOURCES.txt'
installing to build/bdist.macosx-10.13-universal2/wheel
running install
running install_lib
creating build/bdist.macosx-10.13-universal2/wheel
copying build/lib/script.py -> build/bdist.macosx-10.13-universal2/wheel/.
running install_egg_info
Copying script_test.egg-info to build/bdist.macosx-10.13-universal2/wheel/./script_test-0.0.4-py3.12.egg-info
running install_scripts
creating build/bdist.macosx-10.13-universal2/wheel/script_test-0.0.4.dist-info/WHEEL
creating '/Users/andrzej/Desktop/vclust_env/vclust_test/dist/.tmp-8zpx71kj/script_test-0.0.4-py3-none-any.whl' and adding 'build/bdist.macosx-10.13-universal2/wheel' to it
adding 'script.py'
adding 'script_test-0.0.4.dist-info/METADATA'
adding 'script_test-0.0.4.dist-info/WHEEL'
adding 'script_test-0.0.4.dist-info/entry_points.txt'
adding 'script_test-0.0.4.dist-info/top_level.txt'
adding 'script_test-0.0.4.dist-info/RECORD'
removing build/bdist.macosx-10.13-universal2/wheel
Successfully built script_test-0.0.4.tar.gz and script_test-0.0.4-py3-none-any.whl
Подробнее здесь: https://stackoverflow.com/questions/790 ... ing-pyproj