|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>setup</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>setup</h1> |
|
23 <p> |
|
24 Module to prepare a distribution package for uploading to PyPI. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>Version</td></tr><tr><td>appdataFileName</td></tr><tr><td>infoFileName</td></tr><tr><td>sourceDir</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Functions</h3> |
|
35 <table> |
|
36 <tr> |
|
37 <td><a href="#__pyName">__pyName</a></td> |
|
38 <td>Local function to create the Python source file name for the compiled .ui file.</td> |
|
39 </tr><tr> |
|
40 <td><a href="#cleanupSource">cleanupSource</a></td> |
|
41 <td>Cleanup the sources directory to get rid of leftover files and directories.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#compileUiFiles">compileUiFiles</a></td> |
|
44 <td>Compile the .ui files to Python sources.</td> |
|
45 </tr><tr> |
|
46 <td><a href="#getDataFiles">getDataFiles</a></td> |
|
47 <td>Function to return data_files in a platform dependent manner.</td> |
|
48 </tr><tr> |
|
49 <td><a href="#getLongDescription">getLongDescription</a></td> |
|
50 <td>Function to get the long description via the README file.</td> |
|
51 </tr><tr> |
|
52 <td><a href="#getPackageData">getPackageData</a></td> |
|
53 <td>Function to return data files of a package with givene extensions.</td> |
|
54 </tr><tr> |
|
55 <td><a href="#getVersion">getVersion</a></td> |
|
56 <td>Function to get the version from file.</td> |
|
57 </tr><tr> |
|
58 <td><a href="#prepareAppdataFile">prepareAppdataFile</a></td> |
|
59 <td>Function to prepare a .appdata.xml file.</td> |
|
60 </tr><tr> |
|
61 <td><a href="#prepareInfoFile">prepareInfoFile</a></td> |
|
62 <td>Function to prepare an Info.py file.</td> |
|
63 </tr> |
|
64 </table> |
|
65 <hr /><hr /> |
|
66 <a NAME="__pyName" ID="__pyName"></a> |
|
67 <h2>__pyName</h2> |
|
68 <b>__pyName</b>(<i>py_dir, py_file</i>) |
|
69 <p> |
|
70 Local function to create the Python source file name for the compiled |
|
71 .ui file. |
|
72 </p><dl> |
|
73 <dt><i>py_dir</i></dt> |
|
74 <dd> |
|
75 suggested name of the directory (string) |
|
76 </dd><dt><i>py_file</i></dt> |
|
77 <dd> |
|
78 suggested name for the compile source file (string) |
|
79 </dd> |
|
80 </dl><dl> |
|
81 <dt>Returns:</dt> |
|
82 <dd> |
|
83 tuple of directory name (string) and source file name (string) |
|
84 </dd> |
|
85 </dl> |
|
86 <div align="right"><a href="#top">Up</a></div> |
|
87 <hr /><hr /> |
|
88 <a NAME="cleanupSource" ID="cleanupSource"></a> |
|
89 <h2>cleanupSource</h2> |
|
90 <b>cleanupSource</b>(<i>dirName</i>) |
|
91 <p> |
|
92 Cleanup the sources directory to get rid of leftover files |
|
93 and directories. |
|
94 </p><dl> |
|
95 <dt><i>dirName</i></dt> |
|
96 <dd> |
|
97 name of the directory to prune (string) |
|
98 </dd> |
|
99 </dl> |
|
100 <div align="right"><a href="#top">Up</a></div> |
|
101 <hr /><hr /> |
|
102 <a NAME="compileUiFiles" ID="compileUiFiles"></a> |
|
103 <h2>compileUiFiles</h2> |
|
104 <b>compileUiFiles</b>(<i>dirName</i>) |
|
105 <p> |
|
106 Compile the .ui files to Python sources. |
|
107 </p><dl> |
|
108 <dt><i>dirName</i></dt> |
|
109 <dd> |
|
110 name of the directory to compile UI files for (string) |
|
111 </dd> |
|
112 </dl> |
|
113 <div align="right"><a href="#top">Up</a></div> |
|
114 <hr /><hr /> |
|
115 <a NAME="getDataFiles" ID="getDataFiles"></a> |
|
116 <h2>getDataFiles</h2> |
|
117 <b>getDataFiles</b>(<i></i>) |
|
118 <p> |
|
119 Function to return data_files in a platform dependent manner. |
|
120 </p><dl> |
|
121 <dt>Returns:</dt> |
|
122 <dd> |
|
123 list containing the platform specific data files |
|
124 </dd> |
|
125 </dl><dl> |
|
126 <dt>Return Type:</dt> |
|
127 <dd> |
|
128 list of tuples of (str, list of str) |
|
129 </dd> |
|
130 </dl> |
|
131 <div align="right"><a href="#top">Up</a></div> |
|
132 <hr /><hr /> |
|
133 <a NAME="getLongDescription" ID="getLongDescription"></a> |
|
134 <h2>getLongDescription</h2> |
|
135 <b>getLongDescription</b>(<i></i>) |
|
136 <p> |
|
137 Function to get the long description via the README file. |
|
138 </p><dl> |
|
139 <dt>Returns:</dt> |
|
140 <dd> |
|
141 long description |
|
142 </dd> |
|
143 </dl><dl> |
|
144 <dt>Return Type:</dt> |
|
145 <dd> |
|
146 str |
|
147 </dd> |
|
148 </dl> |
|
149 <div align="right"><a href="#top">Up</a></div> |
|
150 <hr /><hr /> |
|
151 <a NAME="getPackageData" ID="getPackageData"></a> |
|
152 <h2>getPackageData</h2> |
|
153 <b>getPackageData</b>(<i>package, extensions</i>) |
|
154 <p> |
|
155 Function to return data files of a package with givene extensions. |
|
156 </p><dl> |
|
157 <dt><i>package</i> (str)</dt> |
|
158 <dd> |
|
159 name of the package directory |
|
160 </dd><dt><i>extensions</i> (list of str)</dt> |
|
161 <dd> |
|
162 list of extensions to test for |
|
163 </dd> |
|
164 </dl><dl> |
|
165 <dt>Returns:</dt> |
|
166 <dd> |
|
167 list of package data files |
|
168 </dd> |
|
169 </dl><dl> |
|
170 <dt>Return Type:</dt> |
|
171 <dd> |
|
172 list of str |
|
173 </dd> |
|
174 </dl> |
|
175 <div align="right"><a href="#top">Up</a></div> |
|
176 <hr /><hr /> |
|
177 <a NAME="getVersion" ID="getVersion"></a> |
|
178 <h2>getVersion</h2> |
|
179 <b>getVersion</b>(<i></i>) |
|
180 <p> |
|
181 Function to get the version from file. |
|
182 </p><dl> |
|
183 <dt>Returns:</dt> |
|
184 <dd> |
|
185 string containing the version |
|
186 </dd> |
|
187 </dl><dl> |
|
188 <dt>Return Type:</dt> |
|
189 <dd> |
|
190 str |
|
191 </dd> |
|
192 </dl> |
|
193 <div align="right"><a href="#top">Up</a></div> |
|
194 <hr /><hr /> |
|
195 <a NAME="prepareAppdataFile" ID="prepareAppdataFile"></a> |
|
196 <h2>prepareAppdataFile</h2> |
|
197 <b>prepareAppdataFile</b>(<i>fileName, version</i>) |
|
198 <p> |
|
199 Function to prepare a .appdata.xml file. |
|
200 </p><dl> |
|
201 <dt><i>fileName</i></dt> |
|
202 <dd> |
|
203 name of the .appdata.xml file (string) |
|
204 </dd><dt><i>version</i></dt> |
|
205 <dd> |
|
206 version string for the package (string) |
|
207 </dd> |
|
208 </dl> |
|
209 <div align="right"><a href="#top">Up</a></div> |
|
210 <hr /><hr /> |
|
211 <a NAME="prepareInfoFile" ID="prepareInfoFile"></a> |
|
212 <h2>prepareInfoFile</h2> |
|
213 <b>prepareInfoFile</b>(<i>fileName, version</i>) |
|
214 <p> |
|
215 Function to prepare an Info.py file. |
|
216 </p><dl> |
|
217 <dt><i>fileName</i></dt> |
|
218 <dd> |
|
219 name of the Python file containing the info (string) |
|
220 </dd><dt><i>version</i></dt> |
|
221 <dd> |
|
222 version string for the package (string) |
|
223 </dd> |
|
224 </dl> |
|
225 <div align="right"><a href="#top">Up</a></div> |
|
226 <hr /> |
|
227 </body></html> |