From 77b0065469d5f77297d9993915e103005457183a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt?= Date: Sat, 29 Feb 2020 19:12:01 +0100 Subject: [PATCH] Add requirements.txt --- README.md | 14 ++------------ getmyancestors.py | 10 +--------- requirements.txt | 7 +++++++ 3 files changed, 10 insertions(+), 21 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 1778c93..5e01d83 100644 --- a/README.md +++ b/README.md @@ -7,24 +7,14 @@ This program is now in production phase, but bugs might still be present. Featur The project is maintained at https://github.com/Linekio/getmyancestors. Visit here for the latest version and more information. -This script requires python3, the requests module, and the babelfish module to work. To install the modules, run in your terminal: +This script requires python3 and the modules indicated in the requirements.txt file. To install the modules, run in your terminal: -For requests: - -"python3 -m pip install requests" (or "python3 -m pip install --user requests" if you don't have admin rights on your machine). - -For babelfish: - -"python3 -m pip install babelfish" (or "python3 -m pip install --user babelfish" if you don't have admin rights on your machine). +"python3 -m pip install -r requirements" (or "python3 -m pip install --user requirements" if you don't have admin rights on your machine). This script requires python 3.4 (or higher) to run due to some novel features in the argparse and asyncio modules (https://docs.python.org/3/whatsnew/3.4.html) -The graphical interface requires tkinter (https://docs.python.org/3/library/tkinter.html) and diskcache. - To download the script, click on the green button "Clone or download" on the top of this page and then click on "Download ZIP". -Current version was updated on November 11th 2018. - How to use ========== diff --git a/getmyancestors.py b/getmyancestors.py index f3dd737..7e3f54f 100755 --- a/getmyancestors.py +++ b/getmyancestors.py @@ -31,19 +31,11 @@ import getpass import asyncio import argparse import requests +import babelfish # local import from translation import translations -try: - import babelfish -except ImportError: - sys.stderr.write("You need to install the babelfish module first\n") - sys.stderr.write( - '(run this in your terminal: "python3 -m pip install babelfish" ' - 'or "python3 -m pip install --user babelfish")\n' - ) - sys.exit(2) # is subject to change: see https://www.familysearch.org/developers/docs/api/tree/Persons_resource MAX_PERSONS = 200 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..06940ae --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +babelfish==0.5.5 +certifi==2019.11.28 +chardet==3.0.4 +diskcache==4.1.0 +idna==2.9 +requests==2.23.0 +urllib3==1.25.8 -- 2.52.0