Browse Source

Merge pull request #1108 from doccano/fix/#1103

Fix Invalid syntax error
pull/1109/head
Hiroki Nakayama 4 years ago
committed by GitHub
parent
commit
fef603341c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 4 deletions
  1. 3
      app/app/settings.py
  2. 23
      setup.py

3
app/app/settings.py

@ -280,7 +280,8 @@ LOGOUT_REDIRECT_URL = '/'
# dynamic import to avoid installing psycopg2 on pip installation. # dynamic import to avoid installing psycopg2 on pip installation.
name = 'django_heroku' name = 'django_heroku'
if (spec := importlib.util.find_spec(name)) is not None:
spec = importlib.util.find_spec(name)
if spec is not None:
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
sys.modules[name] = module sys.modules[name] = module
spec.loader.exec_module(module) spec.loader.exec_module(module)

23
setup.py

@ -16,9 +16,26 @@ here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read() long_description = '\n' + f.read()
# Todo: make a cleaned requirements.txt
required = [line.rstrip() for line in io.open(os.path.join(here, 'app/requirements.txt'))
if not line.startswith(('psycopg2', 'django-heroku', 'django-mssql-backend'))]
required = [
'apache-libcloud>=3.2.0',
'colour>=0.1.5',
'conllu>=4.2.2',
'dj-database-url>=0.5.0',
'django-cors-headers>=3.5.0',
'django-filter>=2.4.0',
'django-rest-polymorphic>=0.1.9',
'djangorestframework-csv>=2.1.0',
'djangorestframework-xml>=2.0.0',
'drf-yasg>=1.20.0',
'environs>=9.2.0',
'furl>=2.1.0',
'pyexcel>=0.6.6',
'pyexcel-xlsx>=0.6.0',
'python-jose>=3.2.0',
'seqeval>=1.2.2',
'social-auth-app-django>=4.0.0',
'whitenoise>=5.2.0'
]
setup( setup(
name=NAME, name=NAME,

Loading…
Cancel
Save