Merge pull request #232039 from natsukium/python3Packages.wikipedia/init

python3Packages.wikipedia: init at 1.4.0; python3Packages.langchain: enable wikipedia
This commit is contained in:
Martin Weinelt 2023-06-28 17:49:22 +02:00 committed by GitHub
commit bf13d993e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 1 deletions

View file

@ -36,6 +36,7 @@
, faiss
, spacy
, nltk
, wikipedia
, beautifulsoup4
, tiktoken
, jinja2
@ -177,7 +178,7 @@ buildPythonPackage rec {
transformers
spacy
nltk
# wikipedia
wikipedia
beautifulsoup4
tiktoken
torch

View file

@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchPypi
, beautifulsoup4
, requests
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "wikipedia";
version = "1.4.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-2w+tGCn91EGxhSMG6YVjmCBNwHhtKZbdLgyLuOJhM7I=";
};
propagatedBuildInputs = [
beautifulsoup4
requests
];
nativeCheckInputs = [
unittestCheckHook
];
unittestFlagsArray = [
"tests/ '*test.py'"
];
meta = with lib; {
description = "A Pythonic wrapper for the Wikipedia API";
homepage = "https://github.com/goldsmith/Wikipedia";
changelog = "https://github.com/goldsmith/Wikipedia/blob/master/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}

View file

@ -13215,6 +13215,8 @@ self: super: with self; {
wifi = callPackage ../development/python-modules/wifi { };
wikipedia = callPackage ../development/python-modules/wikipedia { };
willow = callPackage ../development/python-modules/willow { };
winacl = callPackage ../development/python-modules/winacl { };