Skip to content

Commit

Permalink
python312Packages.tweepy: refactor
Browse files Browse the repository at this point in the history
-add optional-dependencies
  • Loading branch information
fabaff authored Jan 16, 2025
1 parent 3d65d02 commit c293cdd
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions pkgs/development/python-modules/tweepy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,43 @@
pythonOlder,
requests,
requests-oauthlib,
six,
setuptools,
vcrpy,
}:

buildPythonPackage rec {
pname = "tweepy";
version = "4.15.0";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";
disabled = pythonOlder "3.9";

src = fetchFromGitHub {
owner = pname;
repo = pname;
owner = "tweepy";
repo = "tweepy";
tag = "v${version}";
hash = "sha256-vbiMwaJh4cN7OY7eYu2s8azs3A0KXvW/kRPVCx50ZVA=";
};

propagatedBuildInputs = [
aiohttp
async-lru
build-system = [ setuptools ];

dependencies = [
oauthlib
requests
requests-oauthlib
six
];

optional-dependencies = {
async = [
aiohttp
async-lru
];
};

nativeCheckInputs = [
pytestCheckHook
vcrpy
];
] ++ lib.flatten (builtins.attrValues optional-dependencies);

pythonImportsCheck = [ "tweepy" ];

Expand Down

0 comments on commit c293cdd

Please sign in to comment.