New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new: python-modules/tinytag at 1.2.2 #63661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want your commit title to be pythonPackages.tinytag: init at 1.2.2
so it conforms to CONTRIBUTING.md, and the CI/CD tool can automatically build it :)
I would also change your PR title to reflect this as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd apply these changes.
- With python packages you can take the python dependencies as arguments and you don't need
with python3Packages; [ ...]
- The tests are included in the GitHub sources
with ...;
is not the best because it's unclear where attributes come from. That's why I try to reduce it's scope in meta
Some tests are still failing. If you've got time, you can figure out why. If not, just disable them again.
--- i/pkgs/development/python-modules/tinytag/default.nix
+++ w/pkgs/development/python-modules/tinytag/default.nix
@@ -1,25 +1,32 @@
-{ stdenv, fetchPypi, substituteAll, python3Packages }:
-
-python3Packages.buildPythonPackage rec {
- version = "1.2.2";
+{ buildPythonPackage, lib, fetchFromGitHub, twine, pytest, pytestcov, coveralls, flake8, isPy3k }:
+buildPythonPackage rec {
pname = "tinytag";
+ version = "1.2.2";
- src = fetchPypi {
- inherit pname version;
- sha256 = "sha256:0r2pazrqq9lxy3an7vvafc6whglnawx2mi8x75gnrr56a02xpr8h";
+ src = fetchFromGitHub {
+ owner = "devsnd";
+ repo = pname;
+ rev = version;
+ sha256 = "1728m4dsnzkw3f5xphjkc7vmlnc2lf4px9a69jixsi924bljmw1s";
};
- propagatedBuildInputs = with python3Packages; [
+ propagatedBuildInputs = [
twine
];
- # No tests
- doCheck = false;
+ checkInputs = [
+ pytest pytestcov coveralls flake8
+ ];
+
+ doCheck = !isPy3k;
+ postCheck = ''
+ python runtests.py
+ '';
- meta = with stdenv.lib; {
- description = "Read music meta data and length of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files with python 2 or 3";
+ meta = {
+ description = "Read music meta data and length of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files";
homepage = "https://github.com/devsnd/tinytag";
- license = licenses.mit;
- maintainers = [ maintainers.deepfire ];
+ license = lib.licenses.mit;
+ maintainers = with lib.maintainers; [ deepfire ];
};
}
@@ -0,0 +1,25 @@ | |||
{ stdenv, fetchPypi, substituteAll, python3Packages }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicit arguments instead of python3Packages
Thank you for your contributions.
|
no movement in almost a year, going to close. @deepfire feel free to re-open this if you want the package included in nixpkgs |
Motivation for this change
Adds a python tagging library.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)