Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkiss committed Jan 7, 2024
1 parent 59ec2f7 commit 54c7d47
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: messense/maturin-action@v1
with:
args: --release --universal2 --out dist
maturin-version: "v0.14.3"
maturin-version: "v1.4.0"
- name: Install built wheel - universal2
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ bitcoin = "0.29.2"
par-map = "0.1.4"

[build-dependencies]
vergen = "0.1.1"
vergen = { version = "8.2.6", features = ["build", "cargo", "git", "gitcl", "rustc"] }
13 changes: 10 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// build.rs
use vergen::vergen;
use std::error::Error;
use vergen::EmitBuilder;

fn main() {
vergen(vergen::OutputFns::all()).unwrap();
fn main() -> Result<(), Box<dyn Error>> {
// Emit the instructions
EmitBuilder::builder()
.all_build()
.all_git()
.all_cargo()
.emit()?;
Ok(())
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=0.14,<0.15"]
requires = ["maturin>=1.4.0"]
build-backend = "maturin"

[project]
Expand Down
19 changes: 13 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ use pyo3::types::PyString;
use std::iter;
use std::str::FromStr;

include!(concat!(env!("OUT_DIR"), "/version.rs"));

fn xpub_child_to_pk(derivation_path_str: &str, xpub: XPub) -> PyPublicKey {
let derivation_path: DerivationPath = DerivationPath::from_str(derivation_path_str).unwrap();
let mut child_xpub = xpub;
Expand Down Expand Up @@ -64,9 +62,18 @@ fn pycoin_rs(py: Python, m: &PyModule) -> PyResult<()> {
m.add("MAINNET", PyNetwork::new(Network::Bitcoin))?;
m.add("TESTNET", PyNetwork::new(Network::Testnet))?;

m.add("__version__", PyString::new(py, semver()))?;
m.add("__sha__", PyString::new(py, sha()))?;
m.add("__target__", PyString::new(py, target()))?;
m.add("__now__", PyString::new(py, now()))?;
m.add(
"__version__",
PyString::new(py, env!("VERGEN_GIT_DESCRIBE")),
)?;
m.add("__sha__", PyString::new(py, env!("VERGEN_GIT_SHA")))?;
m.add(
"__target__",
PyString::new(py, env!("VERGEN_CARGO_TARGET_TRIPLE")),
)?;
m.add(
"__build_date__",
PyString::new(py, env!("VERGEN_BUILD_DATE")),
)?;
Ok(())
}

0 comments on commit 54c7d47

Please sign in to comment.