nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.4 kB view raw
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 fetchpatch, 5 filetype, 6 future, 7 hypothesis, 8 lib, 9 pytestCheckHook, 10 requests, 11 requests-oauthlib, 12 responses, 13 setuptools, 14}: 15 16buildPythonPackage rec { 17 pname = "python-twitter"; 18 version = "3.5"; 19 20 pyproject = true; 21 build-system = [ setuptools ]; 22 23 src = fetchFromGitHub { 24 owner = "bear"; 25 repo = "python-twitter"; 26 rev = "v${version}"; 27 sha256 = "08ydmf6dcd416cvw6xq1wxsz6b9s21f2mf9fh3y4qz9swj6n9h8z"; 28 }; 29 30 patches = [ 31 # Fix tests. Remove with the next release 32 (fetchpatch { 33 url = "https://github.com/bear/python-twitter/commit/f7eb83d9dca3ba0ee93e629ba5322732f99a3a30.patch"; 34 sha256 = "008b1bd03wwngs554qb136lsasihql3yi7vlcacmk4s5fmr6klqw"; 35 }) 36 ]; 37 38 dependencies = [ 39 filetype 40 future 41 requests 42 requests-oauthlib 43 ]; 44 45 nativeCheckInputs = [ 46 pytestCheckHook 47 responses 48 hypothesis 49 ]; 50 51 postPatch = '' 52 substituteInPlace setup.py \ 53 --replace-fail "'pytest-runner'" "" 54 ''; 55 56 disabledTests = [ 57 # AttributeError: 'FileCacheTest' object has no attribute 'assert_' 58 "test_filecache" 59 ]; 60 61 pythonImportsCheck = [ "twitter" ]; 62 63 meta = { 64 description = "Python wrapper around the Twitter API"; 65 homepage = "https://github.com/bear/python-twitter"; 66 license = lib.licenses.asl20; 67 maintainers = [ ]; 68 }; 69}