title: How to specify Python 3 source in Cython's setup.py?
body: <p>I am trying to do a &quot;Hello World&quot; program in Cython, following this tutorial <a href="http://docs.cython.org/src/tutorial/cython_tutorial.html#cython-hello-world" rel="noreferrer">http://docs.cython.org/src/tutorial/cython_tutorial.html#cython-hello-world</a></p>
  <p>I created <code>helloworld.pyx</code></p>
  <pre><code>print(&quot;Hello World&quot;)
  </code></pre>
  <p>and <code>setup.py</code>:</p>
  <pre><code>from distutils.core import setup
  from Cython.Build import cythonize
  
  setup(
      ext_modules = cythonize(&quot;helloworld.pyx&quot;)
  )
  </code></pre>
  <p>How can I change setup.py to specify that my source is Python 3, rather than Python 2 like in the tutorial? If I invoke &quot;cython&quot; command from the command line, it accepts <code>-3</code> option. But if I compile with <code>python setup.py build_ext --inplace</code> like shown in the tutorial, how do I specify Python 3 source? It may not matter much for a Hello World program, but will matter as I start using Cython for real projects.</p>