Skip to content

Commit d9c8cd4

Browse files
etjgiohappy
authored andcommitted
[Fixes #633] Handle thesauri autoload and packaging
1 parent 9ac2215 commit d9c8cd4

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ else
4444
fi
4545

4646
invoke statics
47+
invoke loadthesauri
4748

4849
echo "Executing UWSGI server $cmd for Production"
4950
fi

src/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ include-package-data = true
2525
[tool.setuptools.packages.find]
2626
where = ["."]
2727
exclude = ["tests*"]
28+
29+
[tool.setuptools.package-data]
30+
"*" = ["**/thesauri/*.rdf"]

src/tasks.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,18 @@ def fixtures(ctx):
195195
print(f"Warning: Failed to load project fixtures: {e}")
196196

197197

198+
@task
199+
def loadthesauri(ctx):
200+
print("**************************thesauri*******************************")
201+
try:
202+
ctx.run(
203+
f"python manage.py thesaurus autoload --settings={_localsettings()}",
204+
pty=True,
205+
)
206+
except Exception:
207+
pass
208+
209+
198210
@task
199211
def updateadmin(ctx):
200212
print("***********************update admin details**************************")

0 commit comments

Comments
 (0)