python3Packages.arch: fix build failure
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
python,
|
||||
fetchFromGitHub,
|
||||
cython,
|
||||
numpy,
|
||||
@@ -8,9 +9,9 @@
|
||||
property-cached,
|
||||
pytestCheckHook,
|
||||
scipy,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
statsmodels,
|
||||
meson-python,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -25,17 +26,10 @@ buildPythonPackage rec {
|
||||
hash = "sha256-qw8sSgsMu6YTiQlzsrePnDKkFBtrxD9RK6ZZE5jFeX0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace-fail 'PytestRemovedIn8Warning' 'PytestRemovedIn9Warning'
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail '"setuptools_scm[toml]>=8.0.3,<9",' '"setuptools_scm[toml]",'
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
cython
|
||||
meson-python
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
@@ -48,6 +42,16 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
# Replace the source tree's arch/ with symlinks to the installed package.
|
||||
# pytest adds rootdir to sys.path, so the source arch/ always shadows the
|
||||
# installed one. The source tree lacks _version.py (generated by setuptools-scm)
|
||||
# and compiled Cython extensions, causing import failures.
|
||||
# Symlinking to the installed package makes all imports resolve correctly.
|
||||
preCheck = ''
|
||||
rm -rf arch
|
||||
ln -s $out/${python.sitePackages}/arch arch
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# Skip long-running/failing tests
|
||||
"arch/tests/univariate/test_forecast.py"
|
||||
|
||||
Reference in New Issue
Block a user