aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gs_ctan/backend.py')
-rw-r--r--gs_ctan/backend.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/gs_ctan/backend.py b/gs_ctan/backend.py
new file mode 100644
index 0000000..a9d0581
--- /dev/null
+++ b/gs_ctan/backend.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ backend.py
+ ~~~~~~~~~~
+
+ CTAN backend
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+import os
+
+from g_sorcery.backend import Backend
+from g_sorcery.metadata import MetadataGenerator
+from g_sorcery.ebuild import EbuildGenerator
+from g_sorcery.eclass import EclassGenerator
+from g_sorcery.fileutils import get_pkgpath
+
+from .ctan_db import CtanDB
+
+
+class CtanEclassGenerator(EclassGenerator):
+ def __init__(self):
+ super(CtanEclassGenerator, self).__init__(os.path.join(get_pkgpath(__file__), 'data'))
+
+
+instance = Backend(CtanDB,
+ EbuildGenerator, EbuildGenerator,
+ CtanEclassGenerator, MetadataGenerator, sync_db=False)