Merge pull request #304881 from GaetanLepage/aesara

python311Packages.aesara: fix build
This commit is contained in:
Pol Dellaiera 2024-05-11 23:06:03 +02:00 committed by GitHub
commit 9ba0818d53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 50 additions and 22 deletions

View File

@ -1,29 +1,34 @@
{ lib
, aesara
, buildPythonPackage
, fetchFromGitHub
, numdifftools
, numpy
, pytestCheckHook
, pythonOlder
, fetchFromGitHub
, setuptools
, aesara
, numpy
, scipy
, numdifftools
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "aeppl";
version = "0.1.5";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "aesara-devs";
repo = pname;
repo = "aeppl";
rev = "refs/tags/v${version}";
hash = "sha256-mqBbXwWJwQA2wSHuEdBeXQMfTIcgwYEjpq8AVmOjmHM=";
};
propagatedBuildInputs = [
build-system = [
setuptools
];
dependencies = [
aesara
numpy
scipy
@ -47,6 +52,14 @@ buildPythonPackage rec {
"test_initial_values"
];
pytestFlagsArray = [
# `numpy.distutils` is deprecated since NumPy 1.23.0, as a result of the deprecation of `distutils` itself.
# It will be removed for Python >= 3.12. For older Python versions it will remain present.
"-Wignore::DeprecationWarning"
# Blas cannot be found, allow fallback to the numpy slower implementation
"-Wignore::UserWarning"
];
meta = with lib; {
description = "Library for an Aesara-based PPL";
homepage = "https://github.com/aesara-devs/aeppl";

View File

@ -16,6 +16,7 @@
, numba-scipy
, numpy
, pytestCheckHook
, pythonAtLeast
, pythonOlder
, scipy
, typing-extensions
@ -24,9 +25,10 @@
buildPythonPackage rec {
pname = "aesara";
version = "2.9.3";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.8";
# Python 3.12 is not supported: https://github.com/aesara-devs/aesara/issues/1520
disabled = pythonOlder "3.8" || pythonAtLeast "3.12";
src = fetchFromGitHub {
owner = "aesara-devs";
@ -35,13 +37,13 @@ buildPythonPackage rec {
hash = "sha256-aO0+O7Ts9phsV4ghunNolxfAruGBbC+tHjVkmFedcCI=";
};
nativeBuildInputs = [
build-system = [
cython
hatch-vcs
hatchling
];
propagatedBuildInputs = [
dependencies = [
cons
etuples
filelock
@ -62,7 +64,8 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--durations=50" ""
--replace-fail "--durations=50" "" \
--replace-fail "hatch-vcs >=0.3.0,<0.4.0" "hatch-vcs"
'';
preBuild = ''
@ -81,12 +84,23 @@ buildPythonPackage rec {
"tests/sparse/sandbox/"
# JAX is not available on all platform and often broken
"tests/link/jax/"
# 2024-04-27: The current nixpkgs numba version is too recent and incompatible with aesara 2.9.3
"tests/link/numba/"
];
disabledTests = [
# Disable all benchmark tests
"test_scan_multiple_output"
"test_logsumexp_benchmark"
# TypeError: exceptions must be derived from Warning, not <class 'NoneType'>
"test_api_deprecation_warning"
# AssertionError: assert ['Elemwise{Co..._i{0} 0', ...] == ['Elemwise{Co..._i{0} 0', ...]
# At index 3 diff: '| |Gemv{inplace} d={0: [0]} 2' != '| |CGemv{inplace} d={0: [0]} 2'
"test_debugprint"
# ValueError: too many values to unpack (expected 3)
"test_ExternalCOp_c_code_cache_version"
];
meta = with lib; {

View File

@ -1,6 +1,6 @@
{ buildPythonPackage
, einops
, fetchFromGitHub
, fetchPypi
, jax
, jaxlib
, lib
@ -10,16 +10,17 @@
buildPythonPackage rec {
pname = "augmax";
version = "0.3.1";
version = "0.3.2";
pyproject = true;
disbaled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "khdlr";
repo = "augmax";
rev = "refs/tags/v${version}";
hash = "sha256-hDNNoE7KVaH3jrXZA4A8f0UoQJPl6KHA3XwMc3Ccohk=";
# Using fetchPypi because the latest version was not tagged on GitHub.
# Switch back to fetchFromGitHub when a tag will be available
# https://github.com/khdlr/augmax/issues/8
src = fetchPypi {
inherit pname version;
hash = "sha256-pf1DTaHA7D+s2rqwwGYlJrJOI7fok+WOvOCtZhOOGHo=";
};
nativeBuildInputs = [
@ -37,7 +38,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Efficiently Composable Data Augmentation on the GPU with Jax";
homepage = "https://github.com/khdlr/augmax";
changelog = "https://github.com/khdlr/augmax/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/khdlr/augmax/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ samuela ];
};