Skip to content

Commit

Permalink
Added building with mypyc
Browse files Browse the repository at this point in the history
  • Loading branch information
trag1c committed Nov 18, 2022
1 parent f019afe commit f47b1db
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2022-11-17

### Added
- Building with `mypyc`

### Changed
- `Rule.converter` is now of type `Callable | bool` and defaults to `True`

### Fixed
- Rule converters can now return `None`

## [1.1.0] - 2022-11-17

### Added
Expand All @@ -16,4 +27,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Initial release 🎉

[1.0.0]: https://github.com/samarium-lang/Samarium/releases/tag/1.0.0
[1.1.0]: https://github.com/samarium-lang/Samarium/compare/1.0.0...1.1.0
[1.1.0]: https://github.com/samarium-lang/Samarium/compare/1.0.0...1.1.0
[1.2.0]: https://github.com/samarium-lang/Samarium/compare/1.1.0...1.2.0
9 changes: 9 additions & 0 deletions _build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from mypyc.build import mypycify

sources = ("__init__.py", "lib.py", "rule.py", "common.py")
ext_modules = mypycify([f"src/crossandra/{i}" for i in sources])


def build(setup_kwargs):
setup_kwargs["ext_modules"] = ext_modules
setup_kwargs["packages"] = ["crossandra"]
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tool.poetry]
name = "crossandra"
version = "1.1.0"
version = "1.2.0"
description = "A simple tokenizer operating on enums with a decent amount of configuration"
authors = ["trag1c <[email protected]>"]
license = "MIT"
repository = "https://github.com/trag1c/crossandra"
readme = "README.md"
build = "_build.py"

[tool.poetry.dependencies]
python = "^3.9"
Expand All @@ -17,5 +18,5 @@ isort = "^5.10.1"
mypy = "^0.990"

[build-system]
requires = ["poetry-core>=1.0.0"]
requires = ["poetry-core>=1.0.0", "mypy-mypyc"]
build-backend = "poetry.core.masonry.api"

0 comments on commit f47b1db

Please sign in to comment.