mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
IE fixes
This commit is contained in:
+3
-3
@@ -29,7 +29,7 @@ mark{display:inline}
|
||||
|
||||
<p>In this chapter, you’ll learn how the setup scripts for <code>chardet</code> and <code>httplib2</code> work, and you’ll step through the process of releasing your own Python software.
|
||||
|
||||
<pre><code class=pp># chardet's setup.py
|
||||
<pre class=pp><code># chardet's setup.py
|
||||
from distutils.core import setup
|
||||
setup(
|
||||
name = "chardet",
|
||||
@@ -157,7 +157,7 @@ chardet/
|
||||
|
||||
<p>The first line of every Distutils setup script is always the same:
|
||||
|
||||
<pre class=nd><code class=pp>from distutils.core import setup</code></pre>
|
||||
<pre class='nd pp'><code>from distutils.core import setup</code></pre>
|
||||
|
||||
<p>This imports the <code>setup()</code> function, which is the main entry point into Distutils. 95% of all Distutils setup scripts consist of a single call to <code>setup()</code> and nothing else. (I totally just made up that statistic, but if your Distutils setup script is doing more than calling the Distutils <code>setup()</code> function, you should have a good reason. Do you have a good reason? I didn’t think so.)
|
||||
|
||||
@@ -187,7 +187,7 @@ chardet/
|
||||
|
||||
<p>Now let’s look at the <code>chardet</code> setup script. It has all of these required and recommended parameters, plus one I haven’t mentioned yet: <code>packages</code>.
|
||||
|
||||
<pre class=nd><code class=pp>from distutils.core import setup
|
||||
<pre class='nd pp'><code>from distutils.core import setup
|
||||
setup(
|
||||
name = 'chardet',
|
||||
<mark>packages = ['chardet']</mark>,
|
||||
|
||||
Reference in New Issue
Block a user