File tree Expand file tree Collapse file tree 10 files changed +46
-16
lines changed
Expand file tree Collapse file tree 10 files changed +46
-16
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ tessdata/
88coverage_html_report /
99.coverage
1010coverage.xml
11+ .vscode
Original file line number Diff line number Diff line change 1515
1616
1717install_requires = [
18- "wagtail>=2,<2.6 " ,
18+ "wagtail>=2,<2.13 " ,
1919 "textract" ,
2020]
2121
5555 'Framework :: Django :: 2.0' ,
5656 'Framework :: Django :: 2.1' ,
5757 'Framework :: Django :: 2.2' ,
58+ 'Framework :: Django :: 3.0' ,
59+ 'Framework :: Django :: 3.1' ,
5860 'Framework :: Wagtail' ,
5961 'Framework :: Wagtail :: 2' ,
6062 'Topic :: Internet :: WWW/HTTP :: Site Management' ,
Original file line number Diff line number Diff line change 11from django .core .management .base import BaseCommand
22
3- from wagtail .documents .models import get_document_model
3+ try :
4+ from wagtail .documents .models import get_document_model
5+ except ImportError :
6+ from wagtail .documents import get_document_model
47
58from wagtail_textract .handlers import async_transcribe_document
69
Original file line number Diff line number Diff line change 11from wagtail .tests .settings import *
22
33WAGTAILDOCS_DOCUMENT_MODEL = 'wagtail_textract.document'
4- INSTALLED_APPS = INSTALLED_APPS + ('wagtail_textract' ,)
4+ INSTALLED_APPS += ('wagtail_textract' ,)
Original file line number Diff line number Diff line change 22
33MEDIA_ROOT = '.'
44WAGTAILDOCS_DOCUMENT_MODEL = 'wagtail_textract.document'
5- INSTALLED_APPS = INSTALLED_APPS + ('wagtail_textract' ,)
5+ if type (INSTALLED_APPS ) is list :
6+ INSTALLED_APPS = INSTALLED_APPS + ['wagtail_textract' ,]
7+ else :
8+ INSTALLED_APPS = INSTALLED_APPS + ('wagtail_textract' ,)
Original file line number Diff line number Diff line change 1- from wagtail .documents .models import get_document_model
1+ try :
2+ from wagtail .documents .models import get_document_model # wagtail < 2.8
3+ except ImportError :
4+ from wagtail .documents import get_document_model # wagtail >= 2.8
25
36
47def test_document_class ():
Original file line number Diff line number Diff line change 33
44from django .core .files import File
55from django .core .management import call_command
6- from wagtail .documents .models import get_document_model
6+ try :
7+ from wagtail .documents .models import get_document_model # wagtail < 2.8
8+ except ImportError :
9+ from wagtail .documents import get_document_model # wagtail >= 2.8
710
811Document = get_document_model ()
912
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ envlist =
44 py{35,36}-dj{21}-wt{23}
55 py{35,36,37}-dj{21}-wt{24}
66 py{35,36,37}-dj{22}-wt{25}
7+ py{35,36,37}-dj{22}-wt{26}
8+ py{35,36,37}-dj{22}-wt{27}
9+ py{35,36,37}-dj{22}-wt{28}
10+ py{35,36,37}-dj{22}-wt{29}
11+ py{36,37}-dj{22}-wt{210}
12+ py{36,37}-dj{22}-wt{211}
713
814[testenv]
915basepython =
@@ -26,6 +32,12 @@ deps =
2632 wt23: wagtail>=2.3,<2.4
2733 wt24: wagtail>=2.4,<2.5
2834 wt25: wagtail>=2.5,<2.6
35+ wt26: wagtail>=2.6,<2.7
36+ wt27: wagtail>=2.7,<2.8
37+ wt28: wagtail>=2.8,<2.9
38+ wt29: wagtail>=2.9,<2.10
39+ wt210: wagtail>=2.10,<2.11
40+ wt211: wagtail>=2.11,<2.12
2941
3042whitelist_externals =
3143 make
Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ nose==1.3.7
1414
1515# needed for managing versions
1616bumpversion==0.5.3
17+ §
Original file line number Diff line number Diff line change 11# This file contains all python dependencies that are required by the textract
22# package in order for it to properly work.
33
4- argcomplete==1.8.2
4+ argcomplete==1.10.0
55chardet==3.0.4
6- python-pptx==0.6.12
6+ python-pptx==0.6.18
7+ pdfminer.six==20181108
78#pdfminer.six <-- go back to this after the shebang fix is released (see https://github.com/goulu/pdfminer/issues/27)
8- https://github.com/goulu/pdfminer/zipball/e6ad15af79a26c31f4e384d8427b375c93b03533#egg=pdfminer.six
9- docx2txt==0.6
10- beautifulsoup4==4.6 .0
11- xlrd==1.0 .0
12- EbookLib==0.16
13- SpeechRecognition==3.7 .1
9+ # https://github.com/goulu/pdfminer/zipball/e6ad15af79a26c31f4e384d8427b375c93b03533#egg=pdfminer.six
10+ docx2txt==0.8
11+ beautifulsoup4=>4.8 .0
12+ xlrd==1.2 .0
13+ EbookLib==0.17.1
14+ SpeechRecognition==3.8 .1
1415https://github.com/mattgwwalker/msg-extractor/zipball/master
15- six==1.10.0
16- pocketsphinx==0.1.3
16+ six==1.12.0
17+ extract-msg==0.23.1
18+ tzlocal==1.5.1
You can’t perform that action at this time.
0 commit comments