Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python fixes #169681

Merged
merged 4 commits into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkgs/development/python-modules/ffcv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ buildPythonPackage rec {
--replace "'webdataset'," ""
'';

buildInputs = [ libjpeg pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libjpeg ];
propagatedBuildInputs = [ opencv4 numba pandas pytorch-pfn-extras terminaltables tqdm ];

# `ffcv._libffcv*.so` cannot be loaded in the nix build environment for some
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/python-modules/onnx/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, bash
, cmake
, fetchPypi
, isPy27
Expand Down Expand Up @@ -43,8 +44,9 @@ buildPythonPackage rec {

postPatch = ''
chmod +x tools/protoc-gen-mypy.sh.in
patchShebangs tools/protoc-gen-mypy.sh.in tools/protoc-gen-mypy.py

patchShebangs tools/protoc-gen-mypy.py
substituteInPlace tools/protoc-gen-mypy.sh.in \
--replace "/bin/bash" "${bash}/bin/bash"
substituteInPlace setup.py \
--replace "setup_requires.append('pytest-runner')" ""
'';
Expand Down
8 changes: 5 additions & 3 deletions pkgs/development/python-modules/pycapnp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ buildPythonPackage rec {
sha256 = "1xi6df93ggkpmwckwbi356v7m32zv5qry8s45hvsps66dz438kmi";
};

buildInputs = [ capnproto cython pkgconfig ];
nativeBuildInputs = [ cython pkgconfig ];

# Tests disabled due to dependency on jinja and various other libraries.
buildInputs = [ capnproto ];

# Tests depend on schema_capnp which fails to generate
doCheck = false;

pythonImportsCheck = [ "capnp" ];

meta = with lib; {
homepage = "https://capnproto.github.io/pycapnp/";
maintainers = with maintainers; [ cstrahan lukeadams ];
license = licenses.bsd2;
homepage = "https://capnproto.github.io/pycapnp/";
};
}
16 changes: 8 additions & 8 deletions pkgs/development/python-modules/pyvips/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{ buildPythonPackage, fetchPypi, pytest-runner, pytestCheckHook, glib, vips, cffi
, pkg-config, pkgconfig, lib }:
{ buildPythonPackage, fetchFromGitHub, pytestCheckHook, glib, vips, cffi
, pkgconfig, lib }:

buildPythonPackage rec {
pname = "pyvips";
version = "2.1.16";

src = fetchPypi {
inherit pname version;
sha256 = "654c03014a15f846786807a2ece6f525a8fec883d1c857742c8e37da149a81ed";
src = fetchFromGitHub {
owner = "libvips";
repo = "pyvips";
rev = "v${version}";
sha256 = "sha256-8CeQbx3f2i0lEU0wxPeUwHlUGtzOztzTOdFNjIDy8s0=";
};

nativeBuildInputs = [ pytest-runner pkgconfig pkg-config ];
nativeBuildInputs = [ pkgconfig ];

buildInputs = [ glib vips ];

propagatedBuildInputs = [ cffi ];

# tests are not included in pypi tarball
doCheck = false;
checkInputs = [ pytestCheckHook ];

pythonImportsCheck = [ "pyvips" ];
Expand Down