It is the first time for me to work on a Python package, and I need some help.
I have correct the dependencies of PySpread, as PySpread 1.99.2 requires Python 3 and PyQt5 instead of Python 2.7 and wxPython, and some of its dependencies no longer support under Python 2.7.
It also need to be wrapped since the $out/bin/pyspread
script in the previous version does not work.
I renamed the original default.nix
to unwrapped.nix
, creating a new default.nix
, and try to wrap it with overrideAttrs
and withPackages
inside.
The new $out/bin/pyspread
complains that some modules are not found:
[user$nixos:/nix/store/kfgx59nra3cy6wibsqnxi43997y3j7hg-python3.6-pyspread-1.99.2/bin]$ ./pyspread
Traceback (most recent call last):
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/dialogs.py", line 82, in <module>
from pyspread.lib.csv import (sniff, csv_reader, get_header, typehandlers,
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/lib/csv.py", line 40, in <module>
from dateutil.parser import parse
ModuleNotFoundError: No module named 'dateutil'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/workflows.py", line 58, in <module>
from pyspread.dialogs \
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/dialogs.py", line 88, in <module>
from actions import ChartDialogActions
ModuleNotFoundError: No module named 'actions'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/pyspread.py", line 62, in <module>
from pyspread.workflows import Workflows
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/workflows.py", line 74, in <module>
import commands
ModuleNotFoundError: No module named 'commands'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/__main__.py", line 23, in <module>
from .pyspread import main
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/pyspread.py", line 72, in <module>
from __init__ import VERSION, APP_NAME
ModuleNotFoundError: No module named '__init__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/gi37qiq9m12yhscn1j12ygv0rvqwj0iq-python3-3.6.11/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/nix/store/gi37qiq9m12yhscn1j12ygv0rvqwj0iq-python3-3.6.11/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/nix/store/iglfaq4rvylwvcfazx9qaj14195z8q7r-python3-3.6.11-env/lib/python3.6/site-packages/pyspread/__main__.py", line 25, in <module>
from pyspread import main
ImportError: cannot import name 'main'
Here is my current progress: