Skip to content

Commit

Permalink
Bump the other Python version and add a script to check
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarcireau committed Jul 7, 2023
1 parent e9062bd commit e5fee52
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ pyo3 = {version = "0.19", features = ["extension-module"]}
cc = "1.0"
neuromorphic-drivers = "0.5"
paste = "1.0"
reflect = {path = "../reflect"}
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
serde-generate = "0.25.1"
reflect = {path = "../reflect"}
toml = {version = "0.7", features = ["parse"]}
27 changes: 27 additions & 0 deletions python/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,33 @@ fn macos_link_search_path() -> Option<String> {
}

fn main() {
{
let cargo_toml = std::fs::read_to_string("Cargo.toml")
.unwrap()
.parse::<toml::Value>()
.unwrap();
let cargo_version = cargo_toml
.get("package")
.unwrap()
.get("version")
.unwrap()
.as_str()
.unwrap();
let pyproject_toml = std::fs::read_to_string("pyproject.toml")
.unwrap()
.parse::<toml::Value>()
.unwrap();
let pyproject_version = pyproject_toml
.get("project")
.unwrap()
.get("version")
.unwrap()
.as_str()
.unwrap();
if cargo_version != pyproject_version {
panic!("the cargo version ({cargo_version}) and the pyproject version ({pyproject_version}) are different");
}
}
if std::env::var("TARGET").unwrap().contains("apple") {
if let Some(path) = macos_link_search_path() {
println!("cargo:rustc-link-lib=clang_rt.osx");
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
{name = "International Centre for Neuromorphic Systems"},
{name = "Alexandre Marcireau"},
]
version = "0.2.2"
version = "0.3.0"
requires-python = ">=3.8"
dependencies = ["numpy>=1.24"]

Expand Down

0 comments on commit e5fee52

Please sign in to comment.