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

mopidy-mpris: init at 3.0.1 mopidy-somafm: init at 2.0.0 mopidy-youtube: 2.0.2 -> 3.0 mopidy-gmusic: 3.0.0 -> 4.0.0 #78361

Merged
merged 4 commits into from May 26, 2020

Conversation

NickHu
Copy link
Contributor

@NickHu NickHu commented Jan 23, 2020

mopidy-gmusic: 3.0.0 -> 4.0.0
mopidy-mpris: init at 3.0.1
mopidy-somafm: init at 2.0.0
mopidy-youtube: 2.0.2 -> 3.0.0

Motivation for this change

This changeset moves mopidy onto the python3 branch (the python2 version is EOL), and updates some plugins. Note that mopidy-mpd was bundled with mopidy previously, but has been extracted into its own plugin in this release. This was merged in a different PR.

This PR is slightly WIP as in I cannot figure out how to get mopidy-youtube to build; any help debugging this build error would be appreciated. Fixed by @balsoft's comment below.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@balsoft
Copy link
Member

balsoft commented Jan 23, 2020

I'm really happy to see this, have been waiting for somebody to do that! Thank you for taking the time to update this.

This works for Mopidy-Youtube:

{ stdenv, python3Packages, mopidy }:

python3Packages.buildPythonApplication rec {
  pname = "mopidy-youtube";
  version = "3.0a1";
  
  src = python3Packages.fetchPypi {
    inherit version;
    pname = "Mopidy-YouTube";
    sha256 = "111b70x4z9ym5578jz3c327cj4l1vkfczgr4y3ggvapa5x2r7maf";
  };
  
  patchPhase = "sed s/bs4/beautifulsoup4/ -i setup.cfg";
  
  propagatedBuildInputs = [
    mopidy
    python3Packages.beautifulsoup4
    python3Packages.youtube-dl
    python3Packages.cachetools
  ];
  
  doCheck = false;
  
  meta = with stdenv.lib; {
    description = "Mopidy extension for playing music from YouTube";
    license = licenses.asl20;
    maintainers = [ maintainers.spwhitt ];
  };
}

So my uneducated guess is that there is a problem with the way beautifulsoup is packaged. Alternatively, we can submit an issue upstream asking whether bs4 is really the correct dependency name.

@balsoft
Copy link
Member

balsoft commented Jan 23, 2020

@GrahamcOfBorg build mopidy mopidy-gmusic mopidy-youtube mopidy-mpd mopidy-mpris mopidy-somafm

@balsoft
Copy link
Member

balsoft commented Jan 23, 2020

Also I believe it's better to have a separate commit for each package.

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.

correct, each package addition and bump should be a separate commit, so 7 in total

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.

please take a look at package failures:

[15 built (6 failed), 14 copied (20.9 MiB), 4.6 MiB DL]
error: build of '/nix/store/gznv1kjf542cb5dv02dl5ayx3jffwjyf-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/78361
7 package failed to build:
mopidy-moped mopidy-mopify mopidy-musicbox-webclient mopidy-soundcloud mopidy-spotify mopidy-spotify-tunigo mopidy-youtube

8 package built:
mopidy mopidy-gmusic mopidy-mpd mopidy-mpris mopidy-somafm python27Packages.pykka python37Packages.pykka python38Packages.pykka

most have similar error:

  Processing ./Mopidy_Spotify-3.1.0-py2.py3-none-any.whl
  ERROR: Could not find a version that satisfies the requirement Mopidy>=2.0 (from Mopidy-Spotify==3.1.0) (from versions: none)
  ERROR: No matching distribution found for Mopidy>=2.0 (from Mopidy-Spotify==3.1.0)

@NickHu
Copy link
Contributor Author

NickHu commented Jan 27, 2020

Right, these are the mopidy plugins which I didn't update (except mopidy-youtube - I can't for the life of me figure out why that's not building) - a lot of them have actually become obsolete, in the sense that they do not support the latest (python3) version of mopidy (see https://mopidy.com/ext/). Should I just remove them or would you suggest another approach? Bearing in mind python2 is now officially considered EOL now

@jonringer
Copy link
Contributor

unfortunately, you cannot have different versions of the same package in python-modules, you could try bumping that which is still compatibly with v2.0.

The other option would be to disable the other packages, however, I don't like the idea of adding packages that are already broken.

@NickHu
Copy link
Contributor Author

NickHu commented Feb 1, 2020

I think you might be misunderstanding me a little - mopidy has migrated to python3, and as such it does not support python2 plugins any more. The plugins which still work have been rewritten/migrated to python3. But many plugins have not been migrated, and I think that we should just remove them

@FRidh
Copy link
Member

FRidh commented Feb 10, 2020

needs a rebase

@jonringer
Copy link
Contributor

I think you might be misunderstanding me a little - mopidy has migrated to python3, and as such it does not support python2 plugins any more. The plugins which still work have been rewritten/migrated to python3. But many plugins have not been migrated, and I think that we should just remove them

If there's no plan to migrate the broken plugins, then please remove. Otherwise you can just mark them broken until they are in a usable state. I would just really like for package evaluation reflect the current condition of the package

@mmilata mmilata mentioned this pull request Feb 17, 2020
10 tasks
@jpotier
Copy link
Contributor

jpotier commented Feb 23, 2020

At least spotify-tunigo can be marked as broken without too much thinking: upstream project is deprecated, and most features are now implemented in the mopidy-spotify plugin.

@balsoft
Copy link
Member

balsoft commented Apr 30, 2020

I can't figure out how to get mopidy gmusic login to work. Does anybody have any idea?

@NickHu NickHu changed the title mopidy: 2.3.1 -> 3.0.1 mopidy-mpd: init at 3.0.0 mopidy-mpris: init at 3.0.1 mopidy-somafm: init at 2.0.0rc1 mopidy-youtube: 2.0.2 -> 3.0a1 pykka: 1.2.0 -> 2.0.2 mopidy-mpris: init at 3.0.1 mopidy-somafm: init at 2.0.0 mopidy-youtube: 2.0.2 -> 3.0 mopidy-gmusic: 3.0.0 -> 4.0.0 May 19, 2020
@ofborg ofborg bot removed the 6.topic: python label May 19, 2020
@NickHu
Copy link
Contributor Author

NickHu commented May 19, 2020

Sorry, I really let this one wither a bit - I updated, rebased, and trimmed off the bits that got merged into other PRs, so I think this ought to be good to merge now

@NickHu
Copy link
Contributor Author

NickHu commented May 19, 2020

@balsoft I just set up a new instance of mopidy, and did a mopidy gmusic login and it worked fine. Note that there's an unfortunate bug mopidy/mopidy-gmusic#231 which causes no tracks to appear when trying to select an album/artist (e.g. in ncmpcpp, pressing "2", Google Play Music -> Albums -> etc), but playing tracks from the All tracks view still works. It was fixed between the last release and master; you can use the following overlay to use the version currently on master of mopidy-gmusic instead:

self: super:
{
  mopidy-gmusic = super.mopidy-gmusic.overrideAttrs (oldAttrs: rec {
    src = self.fetchFromGitHub {
      owner = "mopidy";
      repo = "mopidy-gmusic";
      rev = "a4a78463b9765af62dd8662d45c2f8d9718f2d63";
      sha256 = "116h7v35vy0pvkab0diwfyrf8lcpbam9can8vx5cyjqxhazigzj7";
    };
  });
}

@NickHu
Copy link
Contributor Author

NickHu commented May 19, 2020

@GrahamcOfBorg build mopidy-gmusic mopidy-youtube mopidy-mpris mopidy-somafm

@balsoft
Copy link
Member

balsoft commented May 19, 2020

@NickHu oh, now it works for me too. I guess I have somehow messed up something last time I tried it ;)

@NickHu
Copy link
Contributor Author

NickHu commented May 26, 2020

@balsoft @jpotier @jonringer @FRidh Any remaining objections or should I merge this?

@balsoft
Copy link
Member

balsoft commented May 26, 2020

Can't wait for it to be merged, one more hacky overlay removed from my config!

Thank you very much for this once again!

@NickHu NickHu merged commit bf0b10f into NixOS:master May 26, 2020
@NickHu
Copy link
Contributor Author

NickHu commented May 26, 2020

Result of nixpkgs-review pr 78361 1

3 packages built:
- mopidy-mpris
- mopidy-somafm
- mopidy-youtube

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

5 participants