Merge pull request #157689 from mkg20001/odoofix
This commit is contained in:
commit
34fbb68d2e
2 changed files with 69 additions and 2 deletions
|
@ -5,16 +5,21 @@
|
|||
, python3Packages
|
||||
, nodePackages
|
||||
, wkhtmltopdf
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
with python3Packages;
|
||||
|
||||
let
|
||||
werkzeug = python3Packages.callPackage ../../../development/python-modules/werkzeug/1.nix {};
|
||||
in
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "odoo";
|
||||
|
||||
major = "15";
|
||||
minor = "0";
|
||||
patch = "20211029";
|
||||
patch = "20220126";
|
||||
|
||||
version = "${major}.${minor}.${patch}";
|
||||
|
||||
|
@ -22,7 +27,7 @@ buildPythonApplication rec {
|
|||
src = fetchurl {
|
||||
url = "https://nightly.odoo.com/${major}.${minor}/nightly/src/odoo_${version}.tar.gz";
|
||||
name = "${pname}-${version}";
|
||||
sha256 = "sha256-/E+bLBbiz7fRyTwP+0AMpqbuRkOpE4B4P6kREIB4m1Q=";
|
||||
hash = "sha256-mofV0mNCdyzJecp0XegZBR/5NzHjis9kbpsUA/KJbZg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
62
pkgs/development/python-modules/werkzeug/1.nix
Normal file
62
pkgs/development/python-modules/werkzeug/1.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, buildPythonPackage, fetchPypi
|
||||
, itsdangerous, hypothesis
|
||||
, pytestCheckHook, requests
|
||||
, pytest-timeout
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Werkzeug";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ itsdangerous ];
|
||||
checkInputs = [ pytestCheckHook requests hypothesis pytest-timeout ];
|
||||
|
||||
postPatch = ''
|
||||
# ResourceWarning causes tests to fail
|
||||
rm tests/test_routing.py
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
"test_save_to_pathlib_dst"
|
||||
"test_cookie_maxsize"
|
||||
"test_cookie_samesite_attribute"
|
||||
"test_cookie_samesite_invalid"
|
||||
"test_range_parsing"
|
||||
"test_content_range_parsing"
|
||||
"test_http_date_lt_1000"
|
||||
"test_best_match_works"
|
||||
"test_date_to_unix"
|
||||
"test_easteregg"
|
||||
|
||||
# Seems to be a problematic test-case:
|
||||
#
|
||||
# > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
|
||||
# E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]>
|
||||
# E
|
||||
# E Traceback (most recent call last):
|
||||
# E File "/nix/store/cwv8aj4vsqvimzljw5dxsxy663vjgibj-python3.9-Werkzeug-1.0.1/lib/python3.9/site-packages/werkzeug/formparser.py", line 318, in parse_multipart_headers
|
||||
# E return Headers(result)
|
||||
# E ResourceWarning: unclosed file <_io.FileIO name=11 mode='rb+' closefd=True>
|
||||
"test_basic_routing"
|
||||
"test_merge_slashes_match"
|
||||
"test_merge_slashes_build"
|
||||
"TestMultiPart"
|
||||
"TestHTTPUtility"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"test_get_machine_id"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://palletsprojects.com/p/werkzeug/";
|
||||
description = "A WSGI utility library for Python";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue