Domino
Posts: 4
Joined: Wed Jan 17, 2018 3:44 pm

Making a package for TaskCoach, getting wxversion error

Wed Jan 17, 2018 4:16 pm

I'm currently trying to make a package for TaskCoach and I'm having trouble with wxPython2.

Code: Select all

name       : TaskCoach
version    : 1.4.3
release    : 1
source     :
    - https://sourceforge.net/projects/taskcoach/files/taskcoach/Release-1.4.3/TaskCoach-1.4.3-raw.tgz : f0993b634a7e6dfad41d60a98aaffa8c6afc18d2c432bb56e9d3020be7515cc5
license    : GPL-3.0
component  : office
summary    : Task Coach is a todo manager with composite tasks, effort tracking, categories and more.
description: |
    Task Coach is a simple open source todo manager to keep track of personal tasks and todo lists.
    It is designed for composite tasks, and also offers effort tracking, categories, notes and more.
builddeps  : wxPython2-devel
rundeps : wxPython2
build      : |
    %make prepare
install    : |
    %python_install
The buildsdeps seems to be working correctly:

Code: Select all

Installing 50 / 50
wxPython2-devel-2.8.12.1-3-1-x86_64.eopkg [cached]
Installing wxPython2-devel, version 2.8.12.1, release 3
Extracting the files of wxPython2-devel
Installed wxPython2-devel
Until it gives the following error:

Code: Select all

+ make -j6 prepare
cd thirdparty; tar xzf chardet-2.1.1.tar.gz --strip-components=1 -C ../taskcoachlib/thirdparty chardet-2.1.1/chardet
cd icons.in; "python" make.py
cd templates.in; "python" make.py
Traceback (most recent call last):
  File "make.py", line 21, in <module>
    import wxversion, sys
ImportError: No module named wxversion
cd thirdparty; tar xzf python-dateutil-1.5.tar.gz --strip-components=1 -C ../taskcoachlib/thirdparty python-dateutil-1.5/dateutil
make: *** [Makefile:224: taskcoachlib/gui/icons.py] Error 1
I'm assuming if I install wxPython2 normally then it'll work, but shouldn't it be finding the wxversion installed for the build enviroment?

User avatar
kyrios
Posts: 1926
Joined: Thu Sep 22, 2016 4:20 pm

Re: Making a package for TaskCoach, getting wxversion error

Wed Jan 17, 2018 4:41 pm

You shouldn't mix make and python actionable macros.
Can't you use %python_setup instead of %make prepare (I haven't looked at the source) ?
If not, try replacing %python_install with

Code: Select all

python setup.py install --root="%installroot%"

Domino
Posts: 4
Joined: Wed Jan 17, 2018 3:44 pm

Re: Making a package for TaskCoach, getting wxversion error

Wed Jan 17, 2018 5:36 pm

I think I probably picked a bad choice for my first attempt at packaging. I had a look into the make and it needs networking or a rewrite to Solus standards for a full source compile. I've submitted a package request and I'll try again with the version with precompiled python libraries for my own use for now..

Domino
Posts: 4
Joined: Wed Jan 17, 2018 3:44 pm

Re: Making a package for TaskCoach, getting wxversion error

Wed Jan 17, 2018 7:23 pm

I altered my package.yml to use the prebuilt library version of the source and successfully installed.

Code: Select all

name       : TaskCoach
version    : 1.4.3
release    : 1
source     :
    # - https://sourceforge.net/projects/taskcoach/files/taskcoach/Release-1.4.3/TaskCoach-1.4.3-raw.tgz : f0993b634a7e6dfad41d60a98aaffa8c6afc18d2c432bb56e9d3020be7515cc5
    - http://downloads.sourceforge.net/taskcoach/TaskCoach-1.4.3.tar.gz : a2885ffefc0d5b55a0cbe47ad1a2d57cde52595cbba786ebf661bd2435071a2b
license    : GPL-3.0
component  : office
summary    : Task Coach is a todo manager with composite tasks, effort tracking, categories and more.
description: |
    Task Coach is a simple open source todo manager to keep track of personal tasks and todo lists.
    It is designed for composite tasks, and also offers effort tracking, categories, notes and more.
# builddeps  : wxPython2-devel
rundeps : wxPython2
build      : |
    #%make prepare
install    : |
    python setup.py install --root="%installroot%"
This helped me isolate the original problem as running taskcoach.py didn't work giving the same import error.

I've raised a bug report about the problem with importing wxversion.

Domino
Posts: 4
Joined: Wed Jan 17, 2018 3:44 pm

Re: Making a package for TaskCoach, getting wxversion error

Thu Jan 18, 2018 7:48 pm

I've now got the prebuilt version working. It was a little counter inuitive to have the Python3 wxPython as a dependency for a Python2 application, but once I figured it out everything went smoothly.

Code: Select all

name       : TaskCoach
version    : 1.4.3
release    : 1
source     :
    # - https://sourceforge.net/projects/taskcoach/files/taskcoach/Release-1.4.3/TaskCoach-1.4.3-raw.tgz : f0993b634a7e6dfad41d60a98aaffa8c6afc18d2c432bb56e9d3020be7515cc5
    - http://downloads.sourceforge.net/taskcoach/TaskCoach-1.4.3.tar.gz : a2885ffefc0d5b55a0cbe47ad1a2d57cde52595cbba786ebf661bd2435071a2b
license    : GPL-3.0
component  : office
summary    : Task Coach is a todo manager with composite tasks, effort tracking, categories and more.
description: |
    Task Coach is a simple open source todo manager to keep track of personal tasks and todo lists.
    It is designed for composite tasks, and also offers effort tracking, categories, notes and more.
# builddeps  : wxPython2-devel
rundeps :
    - wxPython2
    - wxPython
    - python-twisted
    - python-zope.interface
build      : |
    #%make prepare
install    : |
    python setup.py install --root="%installroot%"
    install -Dm644 $workdir/build.in/linux_common/taskcoach.desktop $installdir/usr/share/applications/taskcoach.desktop
    install -Dm644 $workdir/icons.in/taskcoach.png $installdir/usr/share/pixmaps/taskcoach.png

Return to “Packaging”