aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-24 00:03:18 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-24 00:03:18 +0200
commit3e4df382f7391e344a9658fbbef84569c25eb4a8 (patch)
tree9589de02d50c12a731f700c8a8a91b875a1f164a /gs_pypi/backend.py
parentgs_ctan/data/gs-ctan.eclass: work with zip-sources with multiple dirs (diff)
downloadg-sorcery-3e4df382f7391e344a9658fbbef84569c25eb4a8.tar.gz
g-sorcery-3e4df382f7391e344a9658fbbef84569c25eb4a8.tar.bz2
g-sorcery-3e4df382f7391e344a9658fbbef84569c25eb4a8.zip
PyPI backend: initial commit
Diffstat (limited to 'gs_pypi/backend.py')
-rw-r--r--gs_pypi/backend.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/gs_pypi/backend.py b/gs_pypi/backend.py
new file mode 100644
index 0000000..9fd6547
--- /dev/null
+++ b/gs_pypi/backend.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ backend.py
+ ~~~~~~~~~~
+
+ PyPI 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.eclass import EclassGenerator
+from g_sorcery.fileutils import get_pkgpath
+
+from .pypi_db import PypiDBGenerator
+from .ebuild import PypiEbuildWithoutDigestGenerator, PypiEbuildWithDigestGenerator
+
+
+class PypiEclassGenerator(EclassGenerator):
+ def __init__(self):
+ super(PypiEclassGenerator, self).__init__(os.path.join(get_pkgpath(__file__), 'data'))
+
+
+instance = Backend(PypiDBGenerator,
+ PypiEbuildWithDigestGenerator, PypiEbuildWithoutDigestGenerator,
+ PypiEclassGenerator, MetadataGenerator)