1 |
commit: d77fe6ac42932ca2072f13414eaa4cbad30d72b0 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 4 16:30:33 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 7 18:43:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d77fe6ac |
7 |
|
8 |
dev-python/namespace-zope: New package to handle namespace |
9 |
|
10 |
Add a new package that installs __init__.py that enables setuptools |
11 |
namespace processing for zope packages. This makes it possible to remove |
12 |
the hacky *.pth files installed by various zope packages currently while |
13 |
preserving namespace package compatibility with Python 2. This in turn |
14 |
should fix some of the issues with namespace handling. |
15 |
|
16 |
dev-python/namespace-zope/metadata.xml | 7 +++++ |
17 |
dev-python/namespace-zope/namespace-zope-1.ebuild | 33 +++++++++++++++++++++++ |
18 |
2 files changed, 40 insertions(+) |
19 |
|
20 |
diff --git a/dev-python/namespace-zope/metadata.xml b/dev-python/namespace-zope/metadata.xml |
21 |
new file mode 100644 |
22 |
index 00000000000..266e3f19ca5 |
23 |
--- /dev/null |
24 |
+++ b/dev-python/namespace-zope/metadata.xml |
25 |
@@ -0,0 +1,7 @@ |
26 |
+<?xml version="1.0" encoding="UTF-8"?> |
27 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
28 |
+<pkgmetadata> |
29 |
+ <maintainer type="project"> |
30 |
+ <email>python@g.o</email> |
31 |
+ </maintainer> |
32 |
+</pkgmetadata> |
33 |
|
34 |
diff --git a/dev-python/namespace-zope/namespace-zope-1.ebuild b/dev-python/namespace-zope/namespace-zope-1.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..c56c155ca61 |
37 |
--- /dev/null |
38 |
+++ b/dev-python/namespace-zope/namespace-zope-1.ebuild |
39 |
@@ -0,0 +1,33 @@ |
40 |
+# Copyright 1999-2017 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=6 |
44 |
+ |
45 |
+PYTHON_COMPAT=( pypy{,3} python{2_7,3_{4,5,6}} ) |
46 |
+inherit python-r1 |
47 |
+ |
48 |
+DESCRIPTION="Namespace package declaration for zope" |
49 |
+HOMEPAGE="" |
50 |
+SRC_URI="" |
51 |
+ |
52 |
+LICENSE="public-domain" |
53 |
+SLOT="0" |
54 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
55 |
+IUSE="" |
56 |
+ |
57 |
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}] |
58 |
+ ${PYTHON_DEPS}" |
59 |
+DEPEND="${PYTHON_DEPS}" |
60 |
+ |
61 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
62 |
+ |
63 |
+src_unpack() { |
64 |
+ mkdir -p "${S}"/zope || die |
65 |
+ cat > "${S}"/zope/__init__.py <<-EOF || die |
66 |
+ __import__('pkg_resources').declare_namespace(__name__) |
67 |
+ EOF |
68 |
+} |
69 |
+ |
70 |
+src_install() { |
71 |
+ python_foreach_impl python_domodule zope |
72 |
+} |