Package with setuptools to be installable with pip.#2
Conversation
| "python-libdiscid", | ||
| "musicbrainzngs", | ||
| "unidecode", | ||
| "ffmpeg" |
There was a problem hiding this comment.
Should be ffmpeg-python, according to the API reference.
| @@ -1,213 +1,6 @@ | |||
| #!/usr/bin/env python3 | |||
| #!/usr/bin/env python | |||
There was a problem hiding this comment.
Should keep python3 as Ubuntu 24.04 does not recognize python. All other files in this repo use python3.
|
I made the changes, and also added the correct license to the classifiers. Seems to install and run from a fresh venv. |
|
Bleh, I always hate git even though it's probably the best VCS. The requested changes are actually pushed now. |
| "python-libdiscid", | ||
| "musicbrainzngs", | ||
| "unidecode", | ||
| "ffmpeg-python" |
There was a problem hiding this comment.
Just noticed you also need the greaseweazle package, which is not published to PyPI:
| "ffmpeg-python" | |
| "ffmpeg-python", | |
| "greaseweazle @ git+https://github.com/keirf/greaseweazle.git@master" |
For reference:
(.venv) ~/d/pyDiscRip (pr/2)> rg import_module
handler/media/floppy.py
69: mod = importlib.import_module('greaseweazle.tools.read')
handler/data/flux.py
65: mod = importlib.import_module('greaseweazle.tools.convert')
(.venv) ~/d/pyDiscRip (pr/2)>|
|
||
| [project] | ||
| name = "pyDiscRip" | ||
| version = "1.0" |
There was a problem hiding this comment.
Should use the same version used in code:
Line 147 in e152fbb
| version = "1.0" | |
| version = "0.1" |
| "unidecode", | ||
| "ffmpeg-python" | ||
| ] | ||
|
|
There was a problem hiding this comment.
Not exactly sure where it fits, but I think it would be beneficial to list out external dependencies. I found the Requires-External directive in the docs, but it does not seem to be widely used at all. As the docs say it also does not do anything with those fields.
More practically it might fit in the readme (for simplicity, these can be combined):
sudo apt-get update
# Compile time dependencies
sudo apt-get install --no-install-recommends \
build-essential \
libdiscid-dev
# Runtime dependenices
sudo apt-get install --no-install-recommends \
bchunk \
cdrdao \
ffmpeg \
gddrescue \
mtools \
7zipbchunkprovides:bchunkcdrdaoprovides:cdrdao,toc2cddb,toc2cueffmpegprovides:ffmpeg,ffplay,ffprobe,qt-faststartgddrescueprovides:ddrescue,ddrescuelogmtoolsprovides:lz,mattrib,mbadblocks,mcat,mcd,mcheck,mcomp,mcopy,mdel,mdeltree,mdir,mdu,mformat,minfo,mkmanifest,mlabel,mmd,mmount,mmove,mpartition,mrd,mren,mshortname,mshowfat,mtools,mtoolstest,mtype,mxtar,mzip,tgz,uz7zipprovides:7z,7za,7zr,p7zip
This should allow to install at least to a venv. A dummy discrip.py was added to the root that just imports the original discrip.py and runs main() so the project works the same way as before where the script can be executed from the directory standalone.
|
Made the changes. The version there was just part of a template and yeah i wasn't going to find that haha. I'm not experienced with this so there's probably more wrong with it. |
This should allow to install at least to a venv. A dummy discrip.py was added to the root that just imports the original discrip.py and runs main() so the project works the same way as before where the script can be executed from the directory standalone.
I'm not super familiar with this and not super confident it's entirely correct but it works for me. Also, the metadata is pretty barebones and maybe you'll want to review it and suggest changes/additions before merging it in.
Also, I don't know if it can be installed "systemwide" as it seems to consider the subdirectories as separate "packages" which might install globally but with very common names like config and handler. I've only tested installing to a venv.