Skip to content

Commit

Permalink
fix asv
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Dec 9, 2022
1 parent ff048b4 commit 64afa31
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
3 changes: 1 addition & 2 deletions asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"html_dir": ".asv/html",
"build_cache_size": 8,
"build_command": [
"python -m pip install 'setuptools_scm[toml]>=4,<6' milksnake",
"python setup.py build",
"python -m pip install 'setuptools_scm[toml]>=4,<6' milksnake maturin",
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
]
}
40 changes: 10 additions & 30 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,17 @@
{
maturin = pkgs.rustPlatform.buildRustPackage rec {
pname = "maturin";
version = "0.14.3";
version = "0.14.5";
src = pkgs.fetchFromGitHub {
owner = "PyO3";
repo = "maturin";
rev = "v0.14.3";
hash = "sha256-n+z05My49LNl5nUaCMw90nLk6EiiAWB/HUCZANvrVuY=";
rev = "v0.14.5";
hash = "sha256-3TEEmraQ9KGx29ok7IUdVzTW0ilaAci1dOZUlKvQYJE==";
};
cargoHash = "sha256-xSUdFzYCbsdyg2uowMRmFSJL1s76KSU9ZJcPYwZsN3Q=";
cargoHash = "sha256-/biWBTNIysg6HDozyF8UdKoxlgkHl9tnyean8+333hI=";
nativeBuildInputs = [ pkgs.pkg-config ];
# buildInputs = lib.optionals stdenv.isLinux [ dbus ]
# ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
# Requires network access, fails in sandbox.
doCheck = false;
# passthru.tests.pyo3 = callPackage ./pyo3-test { };
/*
meta = with lib; {
description = "Build and publish Rust crates Python packages";
longDescription = ''
Build and publish Rust crates with PyO3, rust-cpython, and
cffi bindings as well as Rust binaries as Python packages.
This project is meant as a zero-configuration replacement for
setuptools-rust and Milksnake. It supports building wheels for
Python and can upload them to PyPI.
'';
homepage = "https://github.com/PyO3/maturin";
license = licenses.asl20;
maintainers = [ ];
};
*/
}
;
};
};
};
rustVersion = pkgs.rust-bin.stable.latest.default.override {
Expand Down Expand Up @@ -93,7 +73,7 @@
};

SETUPTOOLS_SCM_PRETEND_VERSION = "1.1";
propagatedBuildInputs = with python; [setuptools bz2file setuptools_scm ];
propagatedBuildInputs = with python; [ setuptools bz2file setuptools_scm ];
doCheck = false;
};

Expand Down Expand Up @@ -161,10 +141,10 @@

git
stdenv.cc.cc.lib
(python310.withPackages (ps: with ps; [ virtualenv tox setuptools ]))
(python311.withPackages (ps: with ps; [ virtualenv setuptools ]))
(python39.withPackages (ps: with ps; [ virtualenv setuptools ]))
(python38.withPackages (ps: with ps; [ virtualenv setuptools ]))
(python310.withPackages (ps: with ps; [ virtualenv tox ]))
(python311.withPackages (ps: with ps; [ virtualenv ]))
(python39.withPackages (ps: with ps; [ virtualenv ]))
(python38.withPackages (ps: with ps; [ virtualenv ]))

rust-cbindgen
maturin
Expand Down
3 changes: 2 additions & 1 deletion src/core/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::env;
use std::path::{Path, PathBuf};

fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
Expand All @@ -11,6 +10,8 @@ fn copy_c_bindings(_crate_dir: &str) {}

#[cfg(feature = "maturin")]
fn copy_c_bindings(crate_dir: &str) {
use std::path::{Path, PathBuf};

fn find_root_dir(crate_dir: &str) -> &Path {
let root_dir = Path::new(crate_dir);

Expand Down

0 comments on commit 64afa31

Please sign in to comment.