title: Python packaging in 2020
body: <p>I am trying to build good habits when developing my python applications and organize them as if they will always be used by others in the future. One crucial part of that is the packaging aspect.</p>
  <p>I have read a certain amount of posts, discussions and the pep 517/518. However, I still don't fully understand how to properly organize my files for packaging.</p>
  <p>I have decided to follow the <code>setup.cfg</code> path instead of the <code>pyproject.toml</code> path. That thing is clear. I shall identify the runtime necessary package in the <code>setup.cfg</code>.</p>
  <p>I am also using <code>virtualenv</code> and I understood that development related package (<code>black</code>, <code>pytest,...</code>) should be defined in a separate file from <code>setup.cfg</code>, usually one called <code>requirements.txt</code>. One thing that is not clear: should <code>setup.cfg</code> be a subset of <code>requirements.txt</code> and therefore repeat some information? This seems bad practice and will at some point definitely become disconnected and hard to maintain.</p>
  <p>I have tried to find an answer to that question. I found this <a href="https://caremad.io/posts/2013/07/setup-vs-requirement/" rel="noreferrer">article</a> but I don't understand how adding this</p>
  <pre><code>--index-url https://pypi.python.org/simple/ 
  -e .
  </code></pre>
  <p>in the requirements.txt helps avoid the issue or even handle the development dependencies.</p>
  <p>I am even more lost when he presents the following possibility:</p>
  <pre><code>--index-url https://pypi.python.org/simple/ 
  -e https://github.com/foo/bar.git#egg=bar
  -e .
  </code></pre>
  <p>What does this achieve?</p>
  <p>Finally, is the <code>setup.cfg</code> way compatible with the building of wheels package?</p>