Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

deepfire
Copy link
Contributor

Motivation for this change

Adds a python tagging library.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@jonringer jonringer left a 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

Copy link
Member

@JohnAZoidberg JohnAZoidberg left a 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 }:
Copy link
Member

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

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@jonringer
Copy link
Contributor

no movement in almost a year, going to close. @deepfire feel free to re-open this if you want the package included in nixpkgs

@jonringer jonringer closed this Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants