diff --git a/pkgs/development/python-modules/torrent-parser/default.nix b/pkgs/development/python-modules/torrent-parser/default.nix new file mode 100644 index 000000000000..2e946229747f --- /dev/null +++ b/pkgs/development/python-modules/torrent-parser/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "torrent-parser"; + version = "0.4.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "7sDream"; + repo = "torrent_parser"; + rev = "v${version}"; + hash = "sha256-zM738r3o9dGZYoWLN7fM4E06m6YPcAODEkgDS6wU/Sc="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "torrent_parser" + ]; + + meta = { + description = "A .torrent file parser and creator for both Python 2 and 3"; + homepage = "https://github.com/7sDream/torrent_parser"; + changelog = "https://github.com/7sDream/torrent_parser/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/torrent_parser/default.nix b/pkgs/development/python-modules/torrent_parser/default.nix deleted file mode 100644 index f60300086f2a..000000000000 --- a/pkgs/development/python-modules/torrent_parser/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ buildPythonPackage, lib, fetchFromGitHub }: - -buildPythonPackage rec { - pname = "torrent_parser"; - version = "0.4.1"; - - # No tarballs on Pypi - src = fetchFromGitHub { - owner = "7sDream"; - repo = "torrent_parser"; - rev = "v${version}"; - sha256 = "sha256-zM738r3o9dGZYoWLN7fM4E06m6YPcAODEkgDS6wU/Sc="; - }; - - meta = { - description = "A .torrent file parser and creator for both Python 2 and 3"; - homepage = "https://github.com/7sDream/torrent_parser"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 0dc2dd780525..b93478d437fd 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -419,6 +419,7 @@ mapAliases ({ Theano = theano; # added 2023-02-19 TheanoWithCuda = theanoWithCuda; # added 2023-02-19 TheanoWithoutCuda = theanoWithoutCuda; # added 2023-02-19 + torrent_parser = torrent-parser; # added 2023-11-04 transip = throw "transip has been removed because it is no longer maintained. TransIP SOAP V5 API was marked as deprecated"; # added 2023-02-27 tumpa = throw "tumpa was promoted to a top-level attribute"; # added 2022-11-19 tvdb_api = tvdb-api; # added 2023-10-20 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6c829cdd4240..c7d2fb4a2f71 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14114,7 +14114,7 @@ self: super: with self; { torpy = callPackage ../development/python-modules/torpy { }; - torrent_parser = callPackage ../development/python-modules/torrent_parser { }; + torrent-parser = callPackage ../development/python-modules/torrent-parser { }; torrequest = callPackage ../development/python-modules/torrequest { };