diff options
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/trytond-add-egg-modules-to-path.patch | 22 | ||||
-rw-r--r-- | gnu/packages/tryton.scm | 52 |
3 files changed, 33 insertions, 42 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index d2105282c6..9eabe871be 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2329,7 +2329,6 @@ dist_patch_DATA = \ %D%/packages/patches/tpetra-remove-duplicate-using.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-4.0.6-fix-build.patch \ - %D%/packages/patches/trytond-add-egg-modules-to-path.patch \ %D%/packages/patches/trytond-add-guix_trytond_path.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tup-unbundle-dependencies.patch \ diff --git a/gnu/packages/patches/trytond-add-egg-modules-to-path.patch b/gnu/packages/patches/trytond-add-egg-modules-to-path.patch deleted file mode 100644 index 1baccfee1c..0000000000 --- a/gnu/packages/patches/trytond-add-egg-modules-to-path.patch +++ /dev/null @@ -1,22 +0,0 @@ -Work around trytond.module not being a real namespace module. - -Solution is to add all trytond module's locations to -trytond.modules._path__. This will make trytond.module behave much -like a namespace module. -Adding to __path__ is done in update_egg_modules() to ensure __path__ -is updated whenever the list of egg modules is updated. - -*** a/trytond/modules/__init__.py 1970-01-01 01:00:01.000000000 +0100 ---- b/trytond/modules/__init__.py 2021-12-02 18:12:15.385101986 +0100 -*************** -*** 38,43 **** ---- 38,46 ---- - import pkg_resources - for ep in pkg_resources.iter_entry_points('trytond.modules'): - EGG_MODULES[ep.name] = ep -+ path = os.path.join(ep.dist.location, 'trytond', 'modules') -+ if not path in __path__ and os.path.isdir(path): -+ __path__.append(path) - except ImportError: - pass - diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm index 7f62e2d339..0e5bd585c0 100644 --- a/gnu/packages/tryton.scm +++ b/gnu/packages/tryton.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,24 +24,29 @@ (define-module (gnu packages tryton) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages databases) #:use-module (gnu packages finance) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages pdf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) #:use-module (gnu packages xml) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (guix build-system pyproject)) (define (guix-trytonpath-search-path version) "Generate a GUIX_TRYTOND_MODULES_PATH search path specification, using @@ -58,41 +64,49 @@ installed in the same environments. Collecting only paths actually containing (define-public trytond (package (name "trytond") - (version "6.2.10") + (version "7.4.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond" version)) (sha256 - (base32 "0s53ig8snbs9936h99pwa0lwhcrd3j3cbpwlmf90mf1chrif7zca")) - (patches (search-patches "trytond-add-egg-modules-to-path.patch" - "trytond-add-guix_trytond_path.patch")))) - (build-system python-build-system) + (base32 "1bwa631qz07k6s5fbki3ph6sx0ch9yss2q4sa1jb67z6angiwv5f")) + (patches (search-patches "trytond-add-guix_trytond_path.patch")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + '(list "-k" + (string-append + ;; "modules" is [None], but should be a list of modules. + "not ModuleTestCase" + ;; fixture 'self' not found + " and not test_method")) + #:phases + '(modify-phases %standard-phases + (add-before 'check 'preparations + (lambda _ + (setenv "DB_NAME" ":memory:") + (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-dateutil python-defusedxml python-genshi python-lxml - python-magic python-passlib python-polib - python-psycopg2 python-relatorio python-sql - python-werkzeug-1.0 ;setup.py requires werkzeug<2 - python-wrapt)) + python-werkzeug)) (native-inputs - (list python-mock python-pillow)) + (list python-pillow + python-pydot + python-pytest + python-setuptools + python-wheel + tzdata-for-tests)) (native-search-paths (list (guix-trytonpath-search-path (package-version python)))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'preparations - (lambda _ - (setenv "DB_NAME" ":memory:") - (setenv "HOME" "/tmp") - #t))))) (home-page "https://www.tryton.org/") (synopsis "Tryton Server") (description "Tryton is a three-tier high-level general purpose |