|
| 1 | +[build-system] |
| 2 | +requires = [ |
| 3 | + "hatchling", |
| 4 | + "hatch-requirements-txt", |
| 5 | + "hatch-vcs", |
| 6 | +] |
| 7 | +build-backend = "hatchling.build" |
| 8 | + |
| 9 | +[project] |
| 10 | +name = "mpy_cross" |
| 11 | +description = "MicroPython cross-compiler" |
| 12 | +readme = "README.md" |
| 13 | +authors = [ |
| 14 | + {name = "Damien George", email = "damien@micropython.org"}, |
| 15 | +] |
| 16 | +urls = {Homepage = "https://github.com/micropython/micropython"} |
| 17 | +keywords = [ |
| 18 | + "hardware", |
| 19 | + "micropython", |
| 20 | +] |
| 21 | +license = {text = "MIT"} |
| 22 | +classifiers = [ |
| 23 | + "Intended Audience :: Developers", |
| 24 | + "License :: OSI Approved :: MIT License", |
| 25 | + "Operating System :: OS Independent", |
| 26 | + "Programming Language :: Python :: 3", |
| 27 | + "Topic :: Software Development :: Embedded Systems", |
| 28 | + "Topic :: System :: Hardware", |
| 29 | +] |
| 30 | +requires-python = ">=3.6" |
| 31 | +dynamic = ["dependencies", "version"] |
| 32 | + |
| 33 | +[project.scripts] |
| 34 | +mpy_cross = "mpy_cross.main:main" |
| 35 | + |
| 36 | +[tool.hatch.metadata.hooks.requirements_txt] |
| 37 | +files = ["requirements.txt"] |
| 38 | + |
| 39 | +[tool.hatch.version] |
| 40 | +source = "vcs" |
| 41 | +tag-pattern = "(?P<version>v(\\d+).(\\d+).(\\d+))" |
| 42 | +raw-options = { root = "..", version_scheme = "post-release" } |
| 43 | + |
| 44 | +[tool.hatch.build] |
| 45 | +packages = ["mpy_cross"] |
| 46 | + |
| 47 | +# Package the compiled wasm binary and add it to the package for both wheel and sdist. |
| 48 | +# Must have run `make -j -f Makefile.wasm` first. |
| 49 | +[tool.hatch.build.force-include] |
| 50 | +"build-wasm/mpy-cross.wasm" = "mpy_cross/mpy-cross.wasm" |
| 51 | + |
| 52 | +# Workaround to allow `python -m build` to work. |
| 53 | +[tool.hatch.build.targets.sdist.force-include] |
| 54 | +"build-wasm/mpy-cross.wasm" = "mpy_cross/mpy-cross.wasm" |
| 55 | +"requirements.txt" = "requirements.txt" |
0 commit comments