diff --git a/Cargo.toml b/Cargo.toml index d03e3e3..1749126 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lazrs" -version = "0.2.2" +version = "0.2.3" authors = ["tmontaigu "] edition = "2018" license = "MIT" diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 0000000..c37b66e --- /dev/null +++ b/noxfile.py @@ -0,0 +1,24 @@ +import nox +import os +from pathlib import Path +import shutil + +WHEEL_DIR = Path(os.environ.get("CARGO_TARGET_DIR", '.target')) / "wheels" + + +@nox.session(python=['3.6', '3.7', '3.8', '3.9']) +def build_wheel(session): + session.install('maturin') + session.run('cargo', 'clean', external=True) + session.run('maturin', 'build', '--interpreter', 'python', '--release') + + wheels = list(WHEEL_DIR.glob('*.whl')) + assert len(wheels) == 1 + wheel = str(wheels[0]) + + # quick test of the wheel + session.install(wheel) + session.run('python', '-c', 'import lazrs') + + # Save the wheel as its going to be erased by the next cargo clean + shutil.copy(wheel, '.')