diff options
author | 2015-04-18 00:19:55 +0200 | |
---|---|---|
committer | 2015-04-18 00:37:18 +0200 | |
commit | 62e36b8aa8fd391ec9ba516e4360d334d19c131d (patch) | |
tree | 41c19e9565f98c970acbbb7ef2eb24f6f180c72c | |
parent | 0.1.3 release (diff) | |
download | gs-elpa-62e36b8aa8fd391ec9ba516e4360d334d19c131d.tar.gz gs-elpa-62e36b8aa8fd391ec9ba516e4360d334d19c131d.tar.bz2 gs-elpa-62e36b8aa8fd391ec9ba516e4360d334d19c131d.zip |
[gs_elpa/elpa_db] use new common data feature to make DB smaller
gs-elpa depends on new g-sorcery (future v.0.2) now, so bump its version
as well
-rw-r--r-- | gs_elpa/elpa_db.py | 31 | ||||
-rw-r--r-- | setup.py | 15 |
2 files changed, 29 insertions, 17 deletions
diff --git a/gs_elpa/elpa_db.py b/gs_elpa/elpa_db.py index e448927..ad0e374 100644 --- a/gs_elpa/elpa_db.py +++ b/gs_elpa/elpa_db.py @@ -4,10 +4,10 @@ """ elpa_db.py ~~~~~~~~~~ - + ELPA package database - - :copyright: (c) 2013-2014 by Jauhien Piatlicki + + :copyright: (c) 2013-2015 by Jauhien Piatlicki :license: GPL-2, see LICENSE for more details. """ @@ -60,7 +60,15 @@ class ElpaDBGenerator(DBGenerator): raise SyncError('sync failed: ' \ + repo_uri + ' bad archive contents format') - pkg_db.add_category('app-emacs') + category = 'app-emacs' + pkg_db.add_category(category) + common_data = {'eclasses' : ['g-sorcery', 'gs-elpa'], + 'maintainer' : [{'email' : 'jauhien@gentoo.org', + 'name' : 'Jauhien Piatlicki'}], + 'homepage' : repo_uri, + 'repo_uri' : repo_uri + } + pkg_db.set_common_data(category, common_data) PKG_INFO = 2 PKG_NAME = 0 @@ -72,7 +80,7 @@ class ElpaDBGenerator(DBGenerator): DEP_NAME = 0 #DEP_VERSION = 1 #we do not use it at the moment - + for entry in sexpdata.cdr(archive_contents): desc = entry[PKG_INFO].value() realname = entry[PKG_NAME].value() @@ -87,9 +95,9 @@ class ElpaDBGenerator(DBGenerator): allowed_ords = set(range(ord('a'), ord('z'))) \ | set(range(ord('A'), ord('Z'))) | \ set(range(ord('0'), ord('9'))) | set(list(map(ord, - ['+', '_', '-', ' ', '.', '(', ')', '[', ']', '{', '}', ',']))) + ['+', '_', '-', ' ', '.', '(', ')', '[', ']', '{', '}', ',']))) description = "".join([x for x in desc[INFO_DESCRIPTION] if ord(x) in allowed_ords]) - + deps = desc[INFO_DEPENDENCIES] #fix for crappy arhive-contents that have "No commentary." @@ -103,20 +111,13 @@ class ElpaDBGenerator(DBGenerator): dep[DEP_NAME].value(), external = False) if dep: dependencies.append(dep) - + properties = {'source_type' : source_type, 'description' : description, 'dependencies' : dependencies, 'depend' : dependencies, 'rdepend' : dependencies, - 'homepage' : repo_uri, - 'repo_uri' : repo_uri, 'realname' : realname, - #eclass entry - 'eclasses' : ['g-sorcery', 'gs-elpa'], - #metadata entries - 'maintainer' : [{'email' : 'jauhien@gentoo.org', - 'name' : 'Jauhien Piatlicki'}], 'longdescription' : description } pkg_db.add_package(pkg, properties) @@ -1,9 +1,20 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" + setup.py + ~~~~~~~~ + + installation script + + :copyright: (c) 2013-2015 by Jauhien Piatlicki + :license: GPL-2, see LICENSE for more details. +""" from distutils.core import setup setup(name = 'gs-elpa', - version = '0.1.3', + version = '0.2', description = 'g-sorcery backend for elisp packages', author = 'Jauhien Piatlicki', author_email = 'jauhien@gentoo.org', @@ -12,5 +23,5 @@ setup(name = 'gs-elpa', scripts = ['bin/gs-elpa'], data_files = [('/etc/g-sorcery/', ['gs-elpa.json']), ('/etc/layman/overlays/', ['gs-elpa-overlays.xml'])], - license = 'GPL', + license = 'GPL-2', ) |