<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://climate-cms.wikis.unsw.edu.au/index.php?action=history&amp;feed=atom&amp;title=How_to_publish_your_Python_code_to_PyPI</id>
	<title>How to publish your Python code to PyPI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://climate-cms.wikis.unsw.edu.au/index.php?action=history&amp;feed=atom&amp;title=How_to_publish_your_Python_code_to_PyPI"/>
	<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;action=history"/>
	<updated>2026-10-03T08:07:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=2002&amp;oldid=prev</id>
		<title>S.wales at 03:21, 23 January 2020</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=2002&amp;oldid=prev"/>
		<updated>2020-01-23T03:21:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 03:21, 23 January 2020&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-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Python]]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{Needs Update}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;[[Category: Python]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To make your code more visible, and easy for others to install and use, you can upload it to [http://pypi.org/ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;PyPI (The Python Package Index)]. PyPI is a repository of software for the Python programming language. It helps people to find and install software developed and shared by the Python community.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;To make your code more visible, and easy for others to install and use, you can upload it to [http://pypi.org/ PyPI (The Python Package Index)]. PyPI is a repository of software for the Python programming language. It helps people to find and install software developed and shared by the Python community.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you have some python code that you would like to make available to others the first step is to make sure it is in a publicly viewable repository at a site like [http://github.com &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;GitHub] or [http://bitbucket.org &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;BitBucket].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;If you have some python code that you would like to make available to others the first step is to make sure it is in a publicly viewable repository at a site like [http://github.com GitHub] or [http://bitbucket.org BitBucket].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The [https://packaging.python.org/tutorials/distributing-packages/ &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;documentation for creating a PyPI package] is the ultimate authority on packaging python code for distribution via PyPI&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. However&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in many simple cases much of the information is superfluous &lt;/del&gt;and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;possibly confusing. If you have a single python source file (or perhaps a handful of source &lt;/del&gt;files&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;) you can follow this [http://antrikshy.com/blog/publish-python-single-file-script-project-structure-pypi-pip-noobs-beginners | clear and simple explanation of the minimum requirement for publishing your code on PyPI]&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;The [https://packaging.python.org/tutorials/distributing-packages/ documentation for creating a PyPI package] is the ultimate authority on packaging python code for distribution via PyPI, and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;should be used for packages with multiple &lt;/ins&gt;files. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As an example, some python code to calculate rank histograms by CoE researcher Oliver Angélil was made into a PyPI package. The [https://github.com/oliverangelil/rankhistogram &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;GitHub repository for rank-histogram] shows the relatively simple directory structure required to create the [https://pypi.python.org/pypi/rank-histogram/0.2 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;PyPI package for rank-histogram]. All that was required was to create an empty file called &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;u&amp;gt;&lt;/del&gt;init&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/u&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/del&gt;.py&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;}} &lt;/del&gt;and a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;{{&lt;/del&gt;setup.py&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/del&gt;file:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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 class=&quot;diffchange diffchange-inline&quot;&gt;If you have a single python source file (or perhaps a handful of source files) you can follow this [http://antrikshy.com/blog/publish-python-single-file-script-project-structure-pypi-pip-noobs-beginners clear and simple explanation of the minimum requirement for publishing your code on PyPI].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;As an example, some python code to calculate rank histograms by CoE researcher Oliver Angélil was made into a PyPI package. The [https://github.com/oliverangelil/rankhistogram &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;GitHub repository for rank-histogram] shows the relatively simple directory structure required to create the [https://pypi.python.org/pypi/rank-histogram/0.2 PyPI package for rank-histogram]. All that was required was to create an empty file called init.py and a setup.py file:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;syntaxhighlight lang=python&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;from setuptools import setup&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;from setuptools import setup&lt;/div&gt;&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-l25&quot; &gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The [http://antrikshy.com/blog/publish-python-single-file-script-project-structure-pypi-pip-noobs-beginners &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;instructions] use the python program &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;&lt;/del&gt;twine&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/span&amp;gt; &lt;/del&gt;which is available in the [&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;https://accessdev.nci.org.au/trac/wiki/User%20Guides/conda &lt;/del&gt;| CMS conda distribution].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;The [http://antrikshy.com/blog/publish-python-single-file-script-project-structure-pypi-pip-noobs-beginners instructions] use the python program twine which is available in the [&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[Conda&lt;/ins&gt;|CMS conda distribution&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;===Other resources=== &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;===Other resources=== &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>S.wales</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=1789&amp;oldid=prev</id>
		<title>S.wales at 03:31, 12 December 2019</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=1789&amp;oldid=prev"/>
		<updated>2019-12-12T03:31:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 03:31, 12 December 2019&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-l8&quot; &gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;As an example, some python code to calculate rank histograms by CoE researcher Oliver Angélil was made into a PyPI package. The [https://github.com/oliverangelil/rankhistogram | GitHub repository for rank-histogram] shows the relatively simple directory structure required to create the [https://pypi.python.org/pypi/rank-histogram/0.2 | PyPI package for rank-histogram]. All that was required was to create an empty file called &amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;u&amp;gt;init&amp;lt;/u&amp;gt;&amp;lt;/nowiki&amp;gt;.py}} and a {{setup.py&amp;lt;/span&amp;gt; file:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;As an example, some python code to calculate rank histograms by CoE researcher Oliver Angélil was made into a PyPI package. The [https://github.com/oliverangelil/rankhistogram | GitHub repository for rank-histogram] shows the relatively simple directory structure required to create the [https://pypi.python.org/pypi/rank-histogram/0.2 | PyPI package for rank-histogram]. All that was required was to create an empty file called &amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;u&amp;gt;init&amp;lt;/u&amp;gt;&amp;lt;/nowiki&amp;gt;.py}} and a {{setup.py&amp;lt;/span&amp;gt; file:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&amp;lt;syntaxhighlight &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lang=python&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;from setuptools import setup&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;from setuptools import setup&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>S.wales</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=787&amp;oldid=prev</id>
		<title>S.wales at 05:57, 18 March 2019</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=787&amp;oldid=prev"/>
		<updated>2019-03-18T05:57:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 05:57, 18 March 2019&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-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;[[Category: Python]]{{Needs Update}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;To make your code more visible, and easy for others to install and use, you can upload it to [http://pypi.org/ | PyPI (The Python Package Index)]. PyPI is a repository of software for the Python programming language. It helps people to find and install software developed and shared by the Python community.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;To make your code more visible, and easy for others to install and use, you can upload it to [http://pypi.org/ | PyPI (The Python Package Index)]. PyPI is a repository of software for the Python programming language. It helps people to find and install software developed and shared by the Python community.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot; &gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;* https://blog.jetbrains.com/pycharm/2017/05/how-to-publish-your-package-on-pypi/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;* https://blog.jetbrains.com/pycharm/2017/05/how-to-publish-your-package-on-pypi/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;* https://tom-christie.github.io/articles/pypi/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;* https://tom-christie.github.io/articles/pypi/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:python]][[Category:pypi]][[Category:publish]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>S.wales</name></author>
		
	</entry>
	<entry>
		<id>http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=165&amp;oldid=prev</id>
		<title>Aidanheerdegen: Imported from Wikispaces</title>
		<link rel="alternate" type="text/html" href="http://climate-cms.wikis.unsw.edu.au/index.php?title=How_to_publish_your_Python_code_to_PyPI&amp;diff=165&amp;oldid=prev"/>
		<updated>2017-07-25T05:49:43Z</updated>

		<summary type="html">&lt;p&gt;Imported from Wikispaces&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To make your code more visible, and easy for others to install and use, you can upload it to [http://pypi.org/ | PyPI (The Python Package Index)]. PyPI is a repository of software for the Python programming language. It helps people to find and install software developed and shared by the Python community.&lt;br /&gt;
&lt;br /&gt;
If you have some python code that you would like to make available to others the first step is to make sure it is in a publicly viewable repository at a site like [http://github.com | GitHub] or [http://bitbucket.org | BitBucket].&lt;br /&gt;
&lt;br /&gt;
The [https://packaging.python.org/tutorials/distributing-packages/ | documentation for creating a PyPI package] is the ultimate authority on packaging python code for distribution via PyPI. However, in many simple cases much of the information is superfluous and possibly confusing. If you have a single python source file (or perhaps a handful of source files) you can follow this [http://antrikshy.com/blog/publish-python-single-file-script-project-structure-pypi-pip-noobs-beginners | clear and simple explanation of the minimum requirement for publishing your code on PyPI].&lt;br /&gt;
&lt;br /&gt;
As an example, some python code to calculate rank histograms by CoE researcher Oliver Angélil was made into a PyPI package. The [https://github.com/oliverangelil/rankhistogram | GitHub repository for rank-histogram] shows the relatively simple directory structure required to create the [https://pypi.python.org/pypi/rank-histogram/0.2 | PyPI package for rank-histogram]. All that was required was to create an empty file called &amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;u&amp;gt;init&amp;lt;/u&amp;gt;&amp;lt;/nowiki&amp;gt;.py}} and a {{setup.py&amp;lt;/span&amp;gt; file:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
from setuptools import setup&lt;br /&gt;
&lt;br /&gt;
setup(&lt;br /&gt;
    name='rank-histogram',&lt;br /&gt;
    description='Python function that takes model data, obs data, and a boolean mask to generate a rank histogram.',&lt;br /&gt;
    version='0.2',&lt;br /&gt;
    url='https://github.com/oliverangelil/rankhistogram',&lt;br /&gt;
    install_requires=['numpy','scipy'],&lt;br /&gt;
    author='Oliver Marc Angelil',&lt;br /&gt;
    author_email='molofishy@gmail.com',&lt;br /&gt;
    py_modules=['ranky'],&lt;br /&gt;
    license='MIT',&lt;br /&gt;
    keywords='rank histogram climate ensemble Hamil'&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://antrikshy.com/blog/publish-python-single-file-script-project-structure-pypi-pip-noobs-beginners | instructions] use the python program &amp;lt;span style=&amp;quot;font-family:monospace&amp;quot;&amp;gt;twine&amp;lt;/span&amp;gt; which is available in the [https://accessdev.nci.org.au/trac/wiki/User%20Guides/conda | CMS conda distribution].&lt;br /&gt;
&lt;br /&gt;
===Other resources=== &lt;br /&gt;
&lt;br /&gt;
* http://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/quickstart.html&lt;br /&gt;
* https://blog.ionelmc.ro/2014/05/25/python-packaging/&lt;br /&gt;
* https://blog.jetbrains.com/pycharm/2017/05/how-to-publish-your-package-on-pypi/&lt;br /&gt;
* https://tom-christie.github.io/articles/pypi/&lt;br /&gt;
[[Category:python]][[Category:pypi]][[Category:publish]]&lt;/div&gt;</summary>
		<author><name>Aidanheerdegen</name></author>
		
	</entry>
</feed>