title: How to build a distribution file?
body: <p>I have created the <code>setup.py</code> file. But I don't know how to make a distribution?</p>
  
  <p>The book said that Open a terminal window and type a single command: <code>python3 setup.py sdist</code>. I did that but always get error!</p>
  
  <p>I feel the code is ok, because it is just the example in the book. I guess the error is from the way I build the distribution.</p>
  
  <p>In the python command line terminal, how to change  directory? </p>
  
  <p>The code of file <code>nester.py</code> goes like following:</p>
  
  <pre><code>def print_lol(the_list):
  for each_item in the_list:
    if isinstance(each_item, list):
      print_lol(each_item)
    else:
      print(each_item)
  </code></pre>
  
  <p>The <code>setup.py</code> file is as following:</p>
  
  <pre><code>from distutils.core import setup
  setup(
    name = 'nester',
    version = '1.0.0',
    py_modules = ['nester'],
    author = 'hfpython',
    author_email = 'hfpython@headfirstlabs.com',
    url = 'http://www.headfirstlabs.com',
    description = 'A simple printer of nested lists',
  )
  </code></pre>
  
  <p>And the command I type in is: <code>python3 setup.py sdist</code> then I get the error:</p>
  
  <pre><code>File "&lt;stdin&gt;",line 1
    pythons setup.py sdist
  syntaxError: invalid syntax
  </code></pre>