From e0f953b224667c7f65767229f029b22b1a9edf6b Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Fri, 9 Dec 2022 12:57:35 -0500 Subject: [PATCH] Loosen version requirement for maturin (#1005) # Description This loosen the version requirement for maturin when building the python package. # Related Issue(s) - closes #1004 # Documentation Using an exact version can be excessively restrictive, for example preventing the use of the latest (but still compatible) version of maturin. Especially when packaging for rolling-releases distributions (like Archlinux), being able to build with the latest version would be beneficial. --- python/Makefile | 4 ++-- python/pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/Makefile b/python/Makefile index 8838114002..db72b4f20f 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := help VENV := venv -MATURIN_VERSION := $(shell awk -F '[ ="]+' '$$1 == "requires" { print $$4 }' pyproject.toml) +MATURIN_VERSION := $(shell grep 'requires =' pyproject.toml | cut -d= -f2- | tr -d '[ "]') PACKAGE_VERSION := $(shell grep version Cargo.toml | head -n 1 | awk '{print $$3}' | tr -d '"' ) .PHONY: setup-venv @@ -12,7 +12,7 @@ setup-venv: ## Setup the virtualenv .PHONY: setup setup: ## Setup the requirements $(info --- Setup dependencies ---) - pip install maturin==$(MATURIN_VERSION) + pip install "$(MATURIN_VERSION)" .PHONY: build build: setup ## Build Python binding of delta-rs diff --git a/python/pyproject.toml b/python/pyproject.toml index 9321c5e937..5d4be70441 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin==0.14.2"] +requires = ["maturin>=0.14,<0.15"] build-backend = "maturin" [project] @@ -82,4 +82,4 @@ markers = [ "azure: marks tests as integration tests with Azure Blob Store", "pandas: marks tests that require pandas", "pyspark: marks tests that require pyspark", -] \ No newline at end of file +]