|
| 1 | +# Notes on how to do a release. |
| 2 | +# |
| 3 | +# * Write release notes in docs/releasenotes.txt |
| 4 | +# * Bump `__version__` and commit. |
| 5 | +# * git tag vx.y |
| 6 | +# * git push origin main vx.y |
| 7 | +# * flit publish |
| 8 | + |
| 9 | +# ===== Project info |
| 10 | + |
| 11 | +[project] |
| 12 | +dynamic = ["version"] |
| 13 | +name = "pscript" |
| 14 | +description = "Python to JavaScript compiler." |
| 15 | +readme = "README.md" |
| 16 | +license = { file = "LICENSE" } |
| 17 | +authors = [{ name = "Almar Klein" }] |
| 18 | +keywords = ["Python", "JavaScript", "compiler", "transpiler", "parser"] |
| 19 | +requires-python = ">= 3.6" |
| 20 | +dependencies = [] |
| 21 | +[project.optional-dependencies] |
| 22 | +lint = ["ruff"] |
| 23 | +tests = ["pytest"] |
| 24 | +docs = ["sphinx"] |
| 25 | +dev = ["pscript[lint,tests, docs]"] |
| 26 | + |
| 27 | +[project.urls] |
| 28 | +Homepage = "https://github.com/flexxui/pscript" |
| 29 | +Documentation = "http://pscript.readthedocs.io" |
| 30 | +Repository = "https://github.com/flexxui/pscript" |
| 31 | + |
| 32 | + |
| 33 | +# ===== Building |
| 34 | + |
| 35 | +# Flit is great solution for simple pure-Python projects. |
| 36 | +[build-system] |
| 37 | +requires = ["flit_core >=3.2,<4"] |
| 38 | +build-backend = "flit_core.buildapi" |
| 39 | + |
| 40 | + |
| 41 | +# ===== Tooling |
| 42 | + |
| 43 | +[tool.ruff] |
| 44 | +line-length = 88 |
| 45 | + |
| 46 | +[tool.ruff.lint] |
| 47 | +select = ["F", "E", "W", "B", "RUF"] |
| 48 | +ignore = [ |
| 49 | + # "RUF005", # Consider iterable unpacking instead of concatenation |
| 50 | +] |
| 51 | + |
| 52 | + |
| 53 | +[tool.coverage.report] |
| 54 | + |
| 55 | +exclude_also = [ |
| 56 | + # Have to re-enable the standard pragma, plus a less-ugly flavor |
| 57 | + "pragma: no cover", |
| 58 | + "no-cover", |
| 59 | + "raise NotImplementedError", |
| 60 | + "raise AssertionError", |
| 61 | + "raise JSError", |
| 62 | + # Don't complain if non-runnable code isn't run: |
| 63 | + "if 0:", |
| 64 | + "if False:", |
| 65 | + "if __name__ == .__main__.:", |
| 66 | + "if this_is_js():", |
| 67 | + |
| 68 | + # Don't complain for platform specific code |
| 69 | + "sys\\.platform.startswith\\(\\'win\\'\\)", |
| 70 | + "sys\\.platform.startswith\\(\\'darwin\\'\\)", |
| 71 | + "getattr\\(sys, \\'frozen\\'\\,\\ None\\)", |
| 72 | + |
| 73 | + # Don't complain about caught import fails |
| 74 | + "except ImportError:", |
| 75 | +] |
0 commit comments