1 |
pythonhead 08/06/20 17:56:36 |
2 |
|
3 |
Modified: developersguide.xml |
4 |
Log: |
5 |
Added setuptools RDEPEND guide |
6 |
|
7 |
Revision Changes Path |
8 |
1.8 xml/htdocs/proj/en/Python/developersguide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/Python/developersguide.xml?rev=1.8&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/Python/developersguide.xml?rev=1.8&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/Python/developersguide.xml?r1=1.7&r2=1.8 |
13 |
|
14 |
Index: developersguide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/developersguide.xml,v |
17 |
retrieving revision 1.7 |
18 |
retrieving revision 1.8 |
19 |
diff -u -r1.7 -r1.8 |
20 |
--- developersguide.xml 29 May 2008 18:40:54 -0000 1.7 |
21 |
+++ developersguide.xml 20 Jun 2008 17:56:35 -0000 1.8 |
22 |
@@ -1,7 +1,7 @@ |
23 |
<?xml version="1.0" encoding="UTF-8"?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
|
26 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/developersguide.xml,v 1.7 2008/05/29 18:40:54 hawking Exp $ --> |
27 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/developersguide.xml,v 1.8 2008/06/20 17:56:35 pythonhead Exp $ --> |
28 |
|
29 |
<guide link="/proj/en/Python/developersguide.xml" lang="en"> |
30 |
<title>Gentoo Python Developers Guide</title> |
31 |
@@ -195,7 +195,7 @@ |
32 |
<pre caption="PYTHON_MODNAME usage (example from ipython-0.7.3.ebuild)"> |
33 |
<comment># Copyright 1999-2007 Gentoo Foundation</comment> |
34 |
<comment># Distributed under the terms of the GNU General Public License v2</comment> |
35 |
-<comment># $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/developersguide.xml,v 1.7 2008/05/29 18:40:54 hawking Exp $</comment> |
36 |
+<comment># $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/Python/developersguide.xml,v 1.8 2008/06/20 17:56:35 pythonhead Exp $</comment> |
37 |
|
38 |
<ident>NEED_PYTHON</ident>=2.3 |
39 |
|
40 |
@@ -412,5 +412,32 @@ |
41 |
|
42 |
</body> |
43 |
</section> |
44 |
+<section> |
45 |
+ <title>Is dev-python/setuptools an RDEPEND or DEPEND?</title> |
46 |
+<body> |
47 |
+ |
48 |
+ <p>repoman may issue a warning saying dev-python/setuptools is a suspicious RDEPEND. Note however that setuptools is quite often a run-time dependency by code that installs commands in /usr/bin, uses pkg_resources to require specific package versions or makes use of entry points in a plugin system. |
49 |
+</p> |
50 |
+<p>If you emerge a package that uses setuptools and it installs commands in /usr/bin you can look at those commands and easily determine if setuptools is required at run-time. |
51 |
+</p> |
52 |
+ |
53 |
+<pre caption="Example of code that requires setuptools at run-time"> |
54 |
+ <stmt>#!/usr/bin/python</stmt> |
55 |
+ <stmt># EASY-INSTALL-ENTRY-SCRIPT: 'doapfiend==0.3.4','console_scripts','doapfiend'</stmt> |
56 |
+ <ident>__requires__</ident> = 'doapfiend==0.3.4' |
57 |
+ <stmt>import sys</stmt> |
58 |
+ <stmt>from pkg_resources import load_entry_point</stmt> |
59 |
+</pre> |
60 |
+<p>If the script imports 'pkg_resources' then dev-python/setuptools must be in RDEPEND. |
61 |
+</p> |
62 |
+<p>You can also use dev-python/yolk to see if a package uses setuptools entry points by giving it the Python <b>module</b> name (not Gentoo package name). |
63 |
+</p> |
64 |
+<pre caption="Example of a Python module that requires setuptools at run-time"> |
65 |
+ <stmt>$ yolk --entry-map paste</stmt> |
66 |
+</pre> |
67 |
+<p>If there is any output, then dev-python/setuptools should be in RDEPEND. |
68 |
+</p> |
69 |
+</body> |
70 |
+</section> |
71 |
</chapter> |
72 |
</guide> |
73 |
|
74 |
|
75 |
|
76 |
-- |
77 |
gentoo-commits@l.g.o mailing list |