Add requirements.txt
authorBenoît <benoitfontaine.ba@gmail.com>
Sat, 29 Feb 2020 18:12:01 +0000 (19:12 +0100)
committerBenoît <benoitfontaine.ba@gmail.com>
Sat, 29 Feb 2020 18:12:01 +0000 (19:12 +0100)
README.md
getmyancestors.py
requirements.txt [new file with mode: 0644]

index 1778c93e49a5780b5f9f081948502be76d89263e..5e01d837676e3a07081dc29a47769cc00df75f22 100644 (file)
--- 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
 ==========
index f3dd73748038b7f87b2b8750e5d8a78e082e8edf..7e3f54f1b60444d9b4811789bd2ee59321838a21 100755 (executable)
@@ -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 (file)
index 0000000..06940ae
--- /dev/null
@@ -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