diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2020-01-10 11:34:18 -0800 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-01-11 12:48:39 -0800 |
commit | 27582b6035507f7322bec4421a1700c2ae450e85 (patch) | |
tree | 4bcb1dc0cbf5013e1e4217d4ae7187e0b77397bd /pkgs/development/python-modules/discordpy | |
parent | 2a7e228c0c54d97a24caceff3041367ddd4d3f1a (diff) | |
download | nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.tar nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.tar.gz nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.tar.bz2 nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.tar.lz nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.tar.xz nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.tar.zst nixpkgs-27582b6035507f7322bec4421a1700c2ae450e85.zip |
python3Packages.discordpy: 1.2.4 -> 1.2.5, enable, add import checks
Diffstat (limited to 'pkgs/development/python-modules/discordpy')
-rw-r--r-- | pkgs/development/python-modules/discordpy/default.nix | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/discordpy/default.nix b/pkgs/development/python-modules/discordpy/default.nix index b25f0b12156..971b811a221 100644 --- a/pkgs/development/python-modules/discordpy/default.nix +++ b/pkgs/development/python-modules/discordpy/default.nix @@ -1,5 +1,5 @@ { lib -, fetchPypi +, fetchFromGitHub , buildPythonPackage , pythonOlder , withVoice ? true, libopus @@ -10,34 +10,45 @@ buildPythonPackage rec { pname = "discord.py"; - version = "1.2.4"; + version = "1.2.5"; + disabled = pythonOlder "3.5.3"; - src = fetchPypi { - inherit pname version; - sha256 = "3e044d84f0bb275d173e2d958cb4a579e525707f90e3e8a15c59901f79e80663"; + # only distributes wheels on pypi now + src = fetchFromGitHub { + owner = "Rapptz"; + repo = pname; + rev = "v${version}"; + sha256 = "17l6mlfi9ikqndpmi4pwlvb53g132cycyfm9nzdyiqr96k8ly4ig"; }; - propagatedBuildInputs = [ aiohttp websockets pynacl ]; + propagatedBuildInputs = [ aiohttp websockets ]; patchPhase = '' substituteInPlace "requirements.txt" \ - --replace "aiohttp>=1.0.0,<1.1.0" "aiohttp" + --replace "aiohttp>=3.3.0,<3.6.0" "aiohttp~=3.3" \ + --replace "websockets>=6.0,<7.0" "websockets>=6" '' + lib.optionalString withVoice '' substituteInPlace "discord/opus.py" \ --replace "ctypes.util.find_library('opus')" "'${libopus}/lib/libopus.so.0'" ''; - disabled = pythonOlder "3.5"; - # No tests in archive + # only have integration tests with discord doCheck = false; + pythonImportsCheck = [ + "discord" + "discord.file" + "discord.member" + "discord.user" + "discord.state" + "discord.guild" + "discord.webhook" + "discord.ext.commands.bot" + ]; + meta = { description = "A python wrapper for the Discord API"; homepage = "https://discordpy.rtfd.org/"; license = lib.licenses.mit; - - # discord.py requires websockets<4.0 - # See https://github.com/Rapptz/discord.py/issues/973 - broken = true; }; } |