public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/betagarden:master commit in: app-text/rinohtype/files/, app-text/rinohtype/
@ 2017-03-19  2:08 Sebastian Pipping
  0 siblings, 0 replies; only message in thread
From: Sebastian Pipping @ 2017-03-19  2:08 UTC (permalink / raw
  To: gentoo-commits

commit:     e89c1a31f82512c00ea665392b3e10d62d8a91d8
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 19 00:50:21 2017 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Mar 19 02:08:04 2017 +0000
URL:        https://gitweb.gentoo.org/proj/betagarden.git/commit/?id=e89c1a31

app-text/rinohtype: 0.3.1

 .../rinohtype/files/rinohtype-0.3.1-consent.patch  | 43 +++++++++++++++++++++
 app-text/rinohtype/metadata.xml                    |  7 ++++
 app-text/rinohtype/rinohtype-0.3.1.ebuild          | 44 ++++++++++++++++++++++
 3 files changed, 94 insertions(+)

diff --git a/app-text/rinohtype/files/rinohtype-0.3.1-consent.patch b/app-text/rinohtype/files/rinohtype-0.3.1-consent.patch
new file mode 100644
index 0000000..d217d2b
--- /dev/null
+++ b/app-text/rinohtype/files/rinohtype-0.3.1-consent.patch
@@ -0,0 +1,43 @@
+From 2735b34d8450e30eca42a149398ae3ff55f79c5f Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 19 Mar 2017 01:36:11 +0100
+Subject: [PATCH] Stop installing PyPI packages on the fly without consent
+
+---
+ src/rinoh/resource.py | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/rinoh/resource.py b/src/rinoh/resource.py
+index 8415003..3fc541b 100644
+--- a/src/rinoh/resource.py
++++ b/src/rinoh/resource.py
+@@ -6,6 +6,7 @@
+ # Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
+ 
+ 
++import os
+ import string
+ from warnings import warn
+ from xmlrpc.client import ServerProxy
+@@ -53,9 +54,17 @@ class Resource(AttributeType):
+ 
+     @classmethod
+     def install_from_pypi(cls, entry_point_name):
++        resource_id = entry_point_name_to_identifier(entry_point_name)
++
++        guard_file = os.path.expanduser('~/.config/rinoh-auto-pip-enabled')
++        if not os.path.exists(guard_file):
++            print("Not installing {} resource '{}' without consent; "
++                  "touch file {} to enable auto-installation if desired."
++                  .format(cls.resource_type, resource_id, guard_file))
++            return False
++
+         success = False
+         pypi = ServerProxy('https://pypi.python.org/pypi')
+-        resource_id = entry_point_name_to_identifier(entry_point_name)
+         distribution_name_parts = ['rinoh', cls.resource_type, resource_id]
+         for pkg in pypi.search(dict(name=distribution_name_parts)):
+             if pkg['name'] == '-'.join(distribution_name_parts):
+-- 
+2.12.0
+

diff --git a/app-text/rinohtype/metadata.xml b/app-text/rinohtype/metadata.xml
new file mode 100644
index 0000000..82b7b79
--- /dev/null
+++ b/app-text/rinohtype/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>sping@gentoo.org</email>
+	</maintainer>
+</pkgmetadata>

diff --git a/app-text/rinohtype/rinohtype-0.3.1.ebuild b/app-text/rinohtype/rinohtype-0.3.1.ebuild
new file mode 100644
index 0000000..88a2a33
--- /dev/null
+++ b/app-text/rinohtype/rinohtype-0.3.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5} )
+PYTHON_REQ_USE="xml"
+
+inherit distutils-r1
+
+DESCRIPTION="Python document processor"
+HOMEPAGE="https://github.com/brechtm/rinohtype"
+SRC_URI="https://github.com/brechtm/rinohtype/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}
+	dev-python/docutils[${PYTHON_USEDEP}]
+	dev-python/pillow[${PYTHON_USEDEP}]
+	dev-python/pip[${PYTHON_USEDEP}]
+	>=dev-python/purepng-0.2.0[${PYTHON_USEDEP}]
+	dev-python/recommonmark[${PYTHON_USEDEP}]
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	dev-python/sphinx[${PYTHON_USEDEP}]
+	"
+RDEPEND="${DEPEND}
+	dev-python/rinoh-typeface-dejavuserif[${PYTHON_USEDEP}]
+	>=dev-python/rinoh-typeface-texgyrecursor-0.1.1[${PYTHON_USEDEP}]
+	>=dev-python/rinoh-typeface-texgyreheros-0.1.1[${PYTHON_USEDEP}]
+	>=dev-python/rinoh-typeface-texgyrepagella-0.1.1[${PYTHON_USEDEP}]
+	"
+
+DOCS=(
+	CHANGES.rst
+	README.rst
+	CONTRIBUTING.rst
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.3.1-consent.patch
+)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-19  2:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-19  2:08 [gentoo-commits] proj/betagarden:master commit in: app-text/rinohtype/files/, app-text/rinohtype/ Sebastian Pipping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox