<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.softwareheritage.org/index.php?action=history&amp;feed=atom&amp;title=Python_package_layout</id>
	<title>Python package layout - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.softwareheritage.org/index.php?action=history&amp;feed=atom&amp;title=Python_package_layout"/>
	<link rel="alternate" type="text/html" href="https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;action=history"/>
	<updated>2026-04-20T12:35:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;diff=687&amp;oldid=prev</id>
		<title>StefanoZacchiroli: /* Makefile */ document &quot;docs&quot; target</title>
		<link rel="alternate" type="text/html" href="https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;diff=687&amp;oldid=prev"/>
		<updated>2017-09-07T13:07:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Makefile: &lt;/span&gt; document &amp;quot;docs&amp;quot; target&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:07, 7 September 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;coverage&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;coverage&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:run test suite and verify code coverage&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:run test suite and verify code coverage&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;docs&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:generate HTML documentation using Sphinx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Generic Python Makefile ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Generic Python Makefile ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>StefanoZacchiroli</name></author>
	</entry>
	<entry>
		<id>https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;diff=233&amp;oldid=prev</id>
		<title>StefanoZacchiroli: 1 revision: import public pages from the intranet wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;diff=233&amp;oldid=prev"/>
		<updated>2016-07-20T13:02:35Z</updated>

		<summary type="html">&lt;p&gt;1 revision: import public pages from the intranet wiki&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:02, 20 July 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>StefanoZacchiroli</name></author>
	</entry>
	<entry>
		<id>https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;diff=232&amp;oldid=prev</id>
		<title>StefanoZacchiroli at 11:56, 23 September 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.softwareheritage.org/index.php?title=Python_package_layout&amp;diff=232&amp;oldid=prev"/>
		<updated>2015-09-23T11:56:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page documents the expected layout/behavior of Python packages developed by [[Software Heritage]].&lt;br /&gt;
&lt;br /&gt;
== Naming convention ==&lt;br /&gt;
&lt;br /&gt;
* a Git repository called &amp;lt;tt&amp;gt;swh-something-else&amp;lt;/tt&amp;gt; contains the Python package &amp;lt;tt&amp;gt;swh.something.else&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile ==&lt;br /&gt;
&lt;br /&gt;
Packages should have a top-level &amp;lt;tt&amp;gt;Makefile&amp;lt;/tt&amp;gt; with the following targets:&lt;br /&gt;
&lt;br /&gt;
;check&lt;br /&gt;
:run static code checks&lt;br /&gt;
;test&lt;br /&gt;
:run test suite&lt;br /&gt;
;coverage&lt;br /&gt;
:run test suite and verify code coverage&lt;br /&gt;
&lt;br /&gt;
=== Generic Python Makefile ===&lt;br /&gt;
&lt;br /&gt;
The simplest way to fulfill Makefile requirements is to use the common Python Makefile available in [[swh-environment]], e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd swh-environment/swh-core &lt;br /&gt;
$ cat Makefile &lt;br /&gt;
# Makefile driver for SWH Python packages. DO NOT CHANGE.&lt;br /&gt;
# You can add custom Makefile rules to Makefile.local&lt;br /&gt;
&lt;br /&gt;
include ../Makefile.python&lt;br /&gt;
-include Makefile.local&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Package metadata ==&lt;br /&gt;
&lt;br /&gt;
Each Python package should use the following top-level files to capture its metadata:&lt;br /&gt;
&lt;br /&gt;
;requirements.txt&lt;br /&gt;
:dependencies on other packages, [https://pip.readthedocs.org/en/1.1/requirements.html as expected by pip]&lt;br /&gt;
;setup.py&lt;br /&gt;
:[http://pythonhosted.org/setuptools/ setuptools] packaging driver&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Python style guide]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software development]]&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>StefanoZacchiroli</name></author>
	</entry>
</feed>