Update build instructions

Julien LepillerMon Dec 06 02:08:23+0100 2021

3fe5c0a

Update build instructions

guix.scm

1212
  (gnu packages fontutils)
1313
  (gnu packages freedesktop)
1414
  (gnu packages libreoffice)
15+
  (gnu packages python)
1516
  (gnu packages python-web)
1617
  (gnu packages python-xyz)
1718
  (gnu packages qt)

4142
    (source (git-checkout (url (dirname (current-filename)))))
4243
    (build-system python-build-system)
4344
    (arguments
44-
     ;; No tests
45-
     `(#:tests? #f))
46-
    (propagated-inputs
45+
     `(#:modules ((guix build python-build-system)
46+
                  (guix build qt-utils)
47+
                  (guix build utils))
48+
       #:imported-modules (,@%python-build-system-modules
49+
                            (guix build qt-utils))
50+
       ;; No tests
51+
       #:tests? #f
52+
       #:phases
53+
       (modify-phases %standard-phases
54+
         (add-before 'build 'generate-fonts
55+
           (lambda _
56+
             (invoke "make" "fonts")))
57+
         (add-after 'install 'wrap-qt
58+
           (lambda* (#:key inputs outputs #:allow-other-keys)
59+
             (let ((out (assoc-ref outputs "out")))
60+
               (wrap-qt-program "offlate" #:output out #:inputs inputs))))
61+
         (add-after 'install 'wrap-offlate
62+
            (lambda* (#:key outputs #:allow-other-keys)
63+
              (wrap-program
64+
                  (string-append (assoc-ref outputs "out") "/bin/offlate")
65+
                `("PYTHONPATH" ":" prefix
66+
                  (,(string-append (getenv "PYTHONPATH") ":"
67+
                   (assoc-ref outputs "out") "/lib/python"
68+
                   ,(version-major+minor (package-version python-wrapper))
69+
                   "/site-packages")))))))))
70+
    (inputs
4771
      `(("python-android-stringslib" ,my-python-android-stringslib)
4872
        ("python-dateutil" ,python-dateutil)
4973
        ("python-gitlab" ,python-gitlab)
5074
        ("python-lxml" ,python-lxml)
5175
        ("python-polib" ,python-polib)
76+
        ("python-pycountry" ,python-pycountry)
5277
        ("python-pyenchant" ,python-pyenchant)
5378
        ("python-pygit2" ,python-pygit2)
5479
        ("python-pygithub" ,python-pygithub)
5580
        ("python-pyqt" ,python-pyqt)
5681
        ("python-requests" ,python-requests)
5782
        ("python-ruamel.yaml" ,python-ruamel.yaml)
83+
        ("python-translate-toolkit" ,python-translate-toolkit)
5884
        ("python-translation-finder" ,python-translation-finder)
5985
        ("python-watchdog" ,python-watchdog)))
6086
    (native-inputs

setup.py

2323
    packages=find_packages(exclude=['.guix-profile*']),
2424
    python_requires = '>=3',
2525
    install_requires=['polib', 'ruamel.yaml', 'python-dateutil', 'PyQt5', 'pygit2',
26-
        'python-gitlab', 'translation-finder', 'android-stringslib', 'watchdog',
27-
        'PyGithub', 'lxml', 'pyenchant'],
26+
        'python-gitlab', 'translate-toolkit', 'translation-finder',
27+
        'android-stringslib', 'watchdog', 'PyGithub', 'lxml', 'pyenchant'],
2828
    entry_points={
2929
        'gui_scripts': [
3030
            'offlate=offlate.ui.main:main',