1 |
commit: b4643cc37763143b0e153b9e941398aa72ca8ef3 |
2 |
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 16 11:59:26 2018 +0000 |
4 |
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 16 11:59:50 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4643cc3 |
7 |
|
8 |
dev-python/sphinx: revert removal of 1.2.3-r1 ebuild |
9 |
|
10 |
Its removal broke QA checks on ~arm64. |
11 |
|
12 |
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
14 |
|
15 |
dev-python/sphinx/Manifest | 1 + |
16 |
dev-python/sphinx/sphinx-1.2.3-r1.ebuild | 125 +++++++++++++++++++++++++++++++ |
17 |
2 files changed, 126 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/sphinx/Manifest b/dev-python/sphinx/Manifest |
20 |
index 3124fdbaddf..1aded9f3083 100644 |
21 |
--- a/dev-python/sphinx/Manifest |
22 |
+++ b/dev-python/sphinx/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST Sphinx-1.2.2.tar.gz 3143671 BLAKE2B a21b2a060363ac86832a6a28a623ed410ff0bb39ca3c9c58618ade88f4305996e54c559bb588c518597e31a73fc16e0c37fc57950eb077179f03715dfee72729 SHA512 44073c215f9d0e7f6c7bc91cb85b0508a96e5cfff5f940fef86e2fc6f11281d03b54e87e51e5a99a23e96b470a93f3af86a6a3ab7c317c747406c55b4c37791c |
25 |
+DIST Sphinx-1.2.3.tar.gz 3200548 BLAKE2B 42033c59e6e38247af12c78cb4f69c73b1dfa883aa8a9e6c180bb74de666b45faef24a55c0bfd3aa1f22bf3e632e0e95016eb1bea54e8b5ebc7df78756763b5c SHA512 00346516e826a65145a3a7fd25ef7cee569ae7fdcc0c1bec3a7301fc08d5d8730d02eee792c3efedfcac17e712ea7e2ad70ea1fcdedc11720ad54f6bcb51ad05 |
26 |
DIST Sphinx-1.7.5.tar.gz 4726802 BLAKE2B 8d828dcae1f3ebb813c5f2de8c096a3fac4ab88b424955c27592349c544b775a21703c904a54efa7f86e1967198f4950804904a82a7142a3499f33c5343506e3 SHA512 db2a8df2cdb2ed78ce2341175575c2b04a149451b2bc8a4f74ddc73e308a19d505874fdbae4e370ce48a9b1cdb4de47cdab489bc57c1b378e857d5b8d04a07b8 |
27 |
|
28 |
diff --git a/dev-python/sphinx/sphinx-1.2.3-r1.ebuild b/dev-python/sphinx/sphinx-1.2.3-r1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..225e80dc9d8 |
31 |
--- /dev/null |
32 |
+++ b/dev-python/sphinx/sphinx-1.2.3-r1.ebuild |
33 |
@@ -0,0 +1,125 @@ |
34 |
+# Copyright 1999-2018 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=5 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) |
40 |
+PYTHON_REQ_USE="threads(+)" |
41 |
+ |
42 |
+inherit distutils-r1 eutils versionator |
43 |
+ |
44 |
+MY_PN="Sphinx" |
45 |
+MY_P="${MY_PN}-${PV}" |
46 |
+ |
47 |
+DESCRIPTION="Python documentation generator" |
48 |
+HOMEPAGE="http://sphinx.pocoo.org/ https://pypi.org/project/Sphinx/" |
49 |
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" |
50 |
+ |
51 |
+LICENSE="BSD" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
54 |
+IUSE="doc latex test" |
55 |
+ |
56 |
+# Portage has only >= minimum required versions of all rdeps making |
57 |
+# setting of version borders unnecessary |
58 |
+RDEPEND=" |
59 |
+ <dev-python/docutils-0.13[${PYTHON_USEDEP}] |
60 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
61 |
+ dev-python/pygments[${PYTHON_USEDEP}] |
62 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
63 |
+ latex? ( |
64 |
+ dev-texlive/texlive-latexextra |
65 |
+ app-text/dvipng |
66 |
+ )" |
67 |
+DEPEND="${DEPEND} |
68 |
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )" |
69 |
+ |
70 |
+S="${WORKDIR}/${MY_P}" |
71 |
+ |
72 |
+python_compile() { |
73 |
+ distutils-r1_python_compile |
74 |
+ |
75 |
+ # Generate the grammar. It will be caught by install somehow. |
76 |
+ # Note that the tests usually do it for us. However, I don't want |
77 |
+ # to trust USE=test really running all the tests, especially |
78 |
+ # with FEATURES=test-fail-continue. |
79 |
+ pushd "${BUILD_DIR}"/lib > /dev/null || die |
80 |
+ "${PYTHON}" -m sphinx.pycode.__init__ \ |
81 |
+ || die "Grammar generation failed." |
82 |
+ popd > /dev/null || die |
83 |
+} |
84 |
+ |
85 |
+python_compile_all() { |
86 |
+ use doc && emake -C doc SPHINXBUILD='"${PYTHON}" "${S}/sphinx-build.py"' html |
87 |
+} |
88 |
+ |
89 |
+python_test() { |
90 |
+ cp -r -l tests "${BUILD_DIR}"/ || die |
91 |
+ |
92 |
+ if $(python_is_python3); then |
93 |
+ 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die |
94 |
+ fi |
95 |
+ |
96 |
+ nosetests -w "${BUILD_DIR}"/tests -v \ |
97 |
+ || die "Tests fail with ${EPYTHON}" |
98 |
+} |
99 |
+ |
100 |
+python_install_all() { |
101 |
+ use doc && local HTML_DOCS=( doc/_build/html/. ) |
102 |
+ |
103 |
+ distutils-r1_python_install_all |
104 |
+} |
105 |
+ |
106 |
+replacing_python_eclass() { |
107 |
+ local pv |
108 |
+ for pv in ${REPLACING_VERSIONS}; do |
109 |
+ if ! version_is_at_least 1.1.3-r4 ${pv}; then |
110 |
+ return 0 |
111 |
+ fi |
112 |
+ done |
113 |
+ |
114 |
+ return 1 |
115 |
+} |
116 |
+ |
117 |
+pkg_preinst() { |
118 |
+ if replacing_python_eclass; then |
119 |
+ # the old python.eclass ebuild will want to remove our pickles... |
120 |
+ backup_pickle() { |
121 |
+ # array to enable filename expansion |
122 |
+ local pickle_name=( |
123 |
+ "${D}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle |
124 |
+ ) |
125 |
+ |
126 |
+ local dest=${ROOT}${pickle_name[0]#${D}}.backup |
127 |
+ |
128 |
+ eumask_push 022 |
129 |
+ mkdir -p "${dest%/*}" || die |
130 |
+ eumask_pop |
131 |
+ |
132 |
+ cp -p -v "${pickle_name[0]}" "${dest}" \ |
133 |
+ || die "Unable to backup grammar pickle from overwriting" |
134 |
+ } |
135 |
+ |
136 |
+ python_foreach_impl backup_pickle |
137 |
+ fi |
138 |
+} |
139 |
+ |
140 |
+pkg_postinst() { |
141 |
+ if replacing_python_eclass; then |
142 |
+ local warned |
143 |
+ |
144 |
+ restore_pickle() { |
145 |
+ local backup_name=( |
146 |
+ "${ROOT}$(python_get_sitedir)"/sphinx/pycode/Grammar*.pickle.backup |
147 |
+ ) |
148 |
+ local dest=${backup_name[0]%.backup} |
149 |
+ |
150 |
+ mv -v "${backup_name[0]}" "${dest}" \ |
151 |
+ || die "Unable to restore grammar pickle backup" |
152 |
+ } |
153 |
+ |
154 |
+ python_foreach_impl restore_pickle |
155 |
+ |
156 |
+ [[ ${warned} ]] && ewarn "Please try rebuilding the package." |
157 |
+ fi |
158 |
+} |