MutopiaProject / mupub

A publication tool rewrite
MIT License
0 stars 2 forks source link

~/.mupub/lycache should be created by `mupub init`? #4

Closed fedelibre closed 4 months ago

fedelibre commented 4 months ago

I had to manually create the directory ~/.mupub/lycache. Shouldn't it be created when mupub init is run?

$ mupub check
Traceback (most recent call last):
  File "/var/home/fede/.local/bin/mupub", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/var/home/fede/.local/lib/python3.12/site-packages/mupub/__main__.py", line 21, in main
    return dispatch(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/fede/.local/lib/python3.12/site-packages/mupub/cli.py", line 134, in dispatch
    main(args.args)
  File "/var/home/fede/.local/lib/python3.12/site-packages/mupub/commands/check.py", line 95, in main
    check(**vars(args))
  File "/var/home/fede/.local/lib/python3.12/site-packages/mupub/commands/check.py", line 67, in check
    path = locator.working_path()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/fede/.local/lib/python3.12/site-packages/mupub/lily.py", line 286, in working_path
    for folder in _cached_compilers():
                  ^^^^^^^^^^^^^^^^^^^
  File "/var/home/fede/.local/lib/python3.12/site-packages/mupub/lily.py", line 26, in _cached_compilers
    for folder in os.listdir(LYCACHE):
                  ^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/home/fede/.mupub/lycache'
fede@fedora:~/src/Mutopia/MutopiaProject/ftp/StetsenkoK/OiChohoTyDube$ mkdir ~/.mupub/lycache
fede@fedora:~/src/Mutopia/MutopiaProject/ftp/StetsenkoK/OiChohoTyDube$ 
fede@fedora:~/src/Mutopia/MutopiaProject/ftp/StetsenkoK/OiChohoTyDube$ mupub check
INFO     mupub.lily   Compiler installation needed for 2.24.0
...
glenl commented 4 months ago

It has been a while since I've looked at this but I'll review it soon and get back with you. My impression was that this tool wasn't being used.

fedelibre commented 4 months ago

Fixed by #6