mirror of
https://github.com/balkian/balkian.github.com.git
synced 2024-11-05 03:21:42 +00:00
Generate Pelican site
This commit is contained in:
parent
7d8d2ffcd4
commit
3e3a8bbe0b
@ -139,9 +139,13 @@ clone and deploy it easily like this:</p>
|
||||
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
||||
jekyll serve -w
|
||||
</pre></div>
|
||||
</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll
|
||||
plugins that might be useful * What CSS tricks I learnt * The webfonts
|
||||
I used * The badge on the left side of the page</p>
|
||||
</td></tr></table><p>I will keep updating this post with information about:</p>
|
||||
<ul class="simple">
|
||||
<li>Some Jekyll plugins that might be useful</li>
|
||||
<li>What CSS tricks I learnt</li>
|
||||
<li>The webfonts I used</li>
|
||||
<li>The badge on the left side of the page</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -213,11 +213,22 @@ memorability over describing the functionality.</p>
|
||||
</div>
|
||||
<div class="section" id="create-a-pypirc-configuration-file">
|
||||
<h2>Create a .pypirc configuration file</h2>
|
||||
<pre class="code cfg literal-block">
|
||||
<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s">
|
||||
pypi # the live PyPI
|
||||
pypitest # test PyPI</span>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13</pre></div></td><td class="code"><div class="highlight"><pre><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s"></span>
|
||||
<span class="s"> pypi # the live PyPI</span>
|
||||
<span class="s"> pypitest # test PyPI</span>
|
||||
|
||||
<span class="err">[pypi]</span> <span class="c1"># authentication details for live PyPI</span>
|
||||
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://pypi.python.org/pypi</span>
|
||||
@ -227,8 +238,8 @@ memorability over describing the functionality.</p>
|
||||
<span class="err">[pypitest]</span> <span class="c1"># authentication details for test PyPI</span>
|
||||
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://testpypi.python.org/pypi</span>
|
||||
<span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span>
|
||||
</pre>
|
||||
<p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi
|
||||
</pre></div>
|
||||
</td></tr></table><p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi
|
||||
repository</a> and
|
||||
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
||||
server</a>.
|
||||
@ -236,6 +247,7 @@ The usernames and passwords might be different, that is up to you!</p>
|
||||
</div>
|
||||
<div class="section" id="prepare-your-package">
|
||||
<h2>Prepare your package</h2>
|
||||
<p>This should be the structure:</p>
|
||||
<pre class="literal-block">
|
||||
root-dir/ # Any name you want
|
||||
setup.py
|
||||
@ -250,32 +262,48 @@ root-dir/ # Any name you want
|
||||
</pre>
|
||||
<div class="section" id="setup-cfg">
|
||||
<h3>setup.cfg</h3>
|
||||
<pre class="code cfg literal-block">
|
||||
<span class="k">[metadata]</span>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[metadata]</span>
|
||||
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
|
||||
</pre>
|
||||
<p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
||||
</pre></div>
|
||||
</td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
||||
also use rST (reStructuredText), the standard in the python community.</p>
|
||||
</div>
|
||||
<div class="section" id="setup-py">
|
||||
<h3>setup.py</h3>
|
||||
<p>{% highlight python %} from distutils.core import setup setup( name =
|
||||
'mypackage', packages = ['mypackage'], # this must be the same as the
|
||||
name above version = '{ version }', description = '{ description }',
|
||||
author = '{ name }', author_email = '{ email }', url =
|
||||
'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo
|
||||
download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}',
|
||||
keywords = ['websockets', 'display', 'd3'], # list of keywords that
|
||||
represent your package classifiers = [], ) {% endhighlight %}</p>
|
||||
<p>You might notice that the download_url points to a Github URL. We could
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span>
|
||||
|
||||
<span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;mypackage&#39;</span><span class="p">,</span>
|
||||
<span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;mypackage&#39;</span><span class="p">],</span> <span class="c"># this must be the same as the name above</span>
|
||||
<span class="n">version</span> <span class="o">=</span> <span class="s">&#39;{ version }&#39;</span><span class="p">,</span>
|
||||
<span class="n">description</span> <span class="o">=</span> <span class="s">&#39;{ description }&#39;</span><span class="p">,</span>
|
||||
<span class="n">author</span> <span class="o">=</span> <span class="s">&#39;{ name }&#39;</span><span class="p">,</span>
|
||||
<span class="n">email</span> <span class="o">=</span> <span class="s">&#39;{ email }&#39;</span><span class="p">,</span>
|
||||
<span class="n">url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{package}&#39;</span><span class="p">,</span> <span class="c"># URL to the github repo</span>
|
||||
<span class="n">download</span>\<span class="n">_url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{repo}/tarball/{version}&#39;</span><span class="p">,</span>
|
||||
<span class="n">keywords</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;websockets&#39;</span><span class="p">,</span> <span class="s">&#39;display&#39;</span><span class="p">,</span> <span class="s">&#39;d3&#39;</span><span class="p">],</span> <span class="c"># list of keywords that represent your package</span>
|
||||
<span class="n">classifiers</span> <span class="o">=</span> <span class="p">[],</span> <span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>You might notice that the download_url points to a Github URL. We could
|
||||
host our package anywhere, but Github is a convenient option. To create
|
||||
the tarball and the zip packages, you only need to tag a tag in your
|
||||
repository and push it to github:</p>
|
||||
<pre class="literal-block">
|
||||
git tag {version} -m &quot;{ Description of this tag/version}&quot;
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2</pre></div></td><td class="code"><div class="highlight"><pre>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">&quot;{ Description of this tag/version}&quot;</span>
|
||||
git push --tags origin master
|
||||
</pre>
|
||||
</div>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<div class="section" id="push-to-the-testing-main-pypi-server">
|
||||
<h2>Push to the testing/main pypi server</h2>
|
||||
@ -307,9 +335,9 @@ new technologies and improve it:</p>
|
||||
<li>Automatic generation of fake personal data to test the interface</li>
|
||||
<li>Obfuscation of personal emails</li>
|
||||
</ul>
|
||||
<p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p>
|
||||
<div class="section" id="publishing-a-python-3-app-on-heroku">
|
||||
<h2>Publishing a Python 3 app on Heroku</h2>
|
||||
<p><a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a></p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>mkvirtualenv -p /usr/bin/python3.3 eurolovemap
|
||||
</pre></div>
|
||||
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
||||
@ -429,7 +457,11 @@ clone and deploy it easily like this:</p>
|
||||
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
||||
jekyll serve -w
|
||||
</pre></div>
|
||||
</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll
|
||||
plugins that might be useful * What CSS tricks I learnt * The webfonts
|
||||
I used * The badge on the left side of the page</p>
|
||||
</td></tr></table><p>I will keep updating this post with information about:</p>
|
||||
<ul class="simple">
|
||||
<li>Some Jekyll plugins that might be useful</li>
|
||||
<li>What CSS tricks I learnt</li>
|
||||
<li>The webfonts I used</li>
|
||||
<li>The badge on the left side of the page</li>
|
||||
</ul>
|
||||
</summary><category term="starters"></category><category term="javascript"></category><category term="ruby"></category><category term="github"></category><category term="git"></category></entry></feed>
|
@ -213,11 +213,22 @@ memorability over describing the functionality.</p>
|
||||
</div>
|
||||
<div class="section" id="create-a-pypirc-configuration-file">
|
||||
<h2>Create a .pypirc configuration file</h2>
|
||||
<pre class="code cfg literal-block">
|
||||
<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s">
|
||||
pypi # the live PyPI
|
||||
pypitest # test PyPI</span>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13</pre></div></td><td class="code"><div class="highlight"><pre><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s"></span>
|
||||
<span class="s"> pypi # the live PyPI</span>
|
||||
<span class="s"> pypitest # test PyPI</span>
|
||||
|
||||
<span class="err">[pypi]</span> <span class="c1"># authentication details for live PyPI</span>
|
||||
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://pypi.python.org/pypi</span>
|
||||
@ -227,8 +238,8 @@ memorability over describing the functionality.</p>
|
||||
<span class="err">[pypitest]</span> <span class="c1"># authentication details for test PyPI</span>
|
||||
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://testpypi.python.org/pypi</span>
|
||||
<span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span>
|
||||
</pre>
|
||||
<p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi
|
||||
</pre></div>
|
||||
</td></tr></table><p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi
|
||||
repository</a> and
|
||||
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
||||
server</a>.
|
||||
@ -236,6 +247,7 @@ The usernames and passwords might be different, that is up to you!</p>
|
||||
</div>
|
||||
<div class="section" id="prepare-your-package">
|
||||
<h2>Prepare your package</h2>
|
||||
<p>This should be the structure:</p>
|
||||
<pre class="literal-block">
|
||||
root-dir/ # Any name you want
|
||||
setup.py
|
||||
@ -250,32 +262,48 @@ root-dir/ # Any name you want
|
||||
</pre>
|
||||
<div class="section" id="setup-cfg">
|
||||
<h3>setup.cfg</h3>
|
||||
<pre class="code cfg literal-block">
|
||||
<span class="k">[metadata]</span>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[metadata]</span>
|
||||
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
|
||||
</pre>
|
||||
<p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
||||
</pre></div>
|
||||
</td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
||||
also use rST (reStructuredText), the standard in the python community.</p>
|
||||
</div>
|
||||
<div class="section" id="setup-py">
|
||||
<h3>setup.py</h3>
|
||||
<p>{% highlight python %} from distutils.core import setup setup( name =
|
||||
'mypackage', packages = ['mypackage'], # this must be the same as the
|
||||
name above version = '{ version }', description = '{ description }',
|
||||
author = '{ name }', author_email = '{ email }', url =
|
||||
'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo
|
||||
download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}',
|
||||
keywords = ['websockets', 'display', 'd3'], # list of keywords that
|
||||
represent your package classifiers = [], ) {% endhighlight %}</p>
|
||||
<p>You might notice that the download_url points to a Github URL. We could
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span>
|
||||
|
||||
<span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;mypackage&#39;</span><span class="p">,</span>
|
||||
<span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;mypackage&#39;</span><span class="p">],</span> <span class="c"># this must be the same as the name above</span>
|
||||
<span class="n">version</span> <span class="o">=</span> <span class="s">&#39;{ version }&#39;</span><span class="p">,</span>
|
||||
<span class="n">description</span> <span class="o">=</span> <span class="s">&#39;{ description }&#39;</span><span class="p">,</span>
|
||||
<span class="n">author</span> <span class="o">=</span> <span class="s">&#39;{ name }&#39;</span><span class="p">,</span>
|
||||
<span class="n">email</span> <span class="o">=</span> <span class="s">&#39;{ email }&#39;</span><span class="p">,</span>
|
||||
<span class="n">url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{package}&#39;</span><span class="p">,</span> <span class="c"># URL to the github repo</span>
|
||||
<span class="n">download</span>\<span class="n">_url</span> <span class="o">=</span> <span class="s">&#39;https://github.com/{user}/{repo}/tarball/{version}&#39;</span><span class="p">,</span>
|
||||
<span class="n">keywords</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;websockets&#39;</span><span class="p">,</span> <span class="s">&#39;display&#39;</span><span class="p">,</span> <span class="s">&#39;d3&#39;</span><span class="p">],</span> <span class="c"># list of keywords that represent your package</span>
|
||||
<span class="n">classifiers</span> <span class="o">=</span> <span class="p">[],</span> <span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>You might notice that the download_url points to a Github URL. We could
|
||||
host our package anywhere, but Github is a convenient option. To create
|
||||
the tarball and the zip packages, you only need to tag a tag in your
|
||||
repository and push it to github:</p>
|
||||
<pre class="literal-block">
|
||||
git tag {version} -m &quot;{ Description of this tag/version}&quot;
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2</pre></div></td><td class="code"><div class="highlight"><pre>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">&quot;{ Description of this tag/version}&quot;</span>
|
||||
git push --tags origin master
|
||||
</pre>
|
||||
</div>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<div class="section" id="push-to-the-testing-main-pypi-server">
|
||||
<h2>Push to the testing/main pypi server</h2>
|
||||
@ -307,9 +335,9 @@ new technologies and improve it:</p>
|
||||
<li>Automatic generation of fake personal data to test the interface</li>
|
||||
<li>Obfuscation of personal emails</li>
|
||||
</ul>
|
||||
<p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p>
|
||||
<div class="section" id="publishing-a-python-3-app-on-heroku">
|
||||
<h2>Publishing a Python 3 app on Heroku</h2>
|
||||
<p><a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a></p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>mkvirtualenv -p /usr/bin/python3.3 eurolovemap
|
||||
</pre></div>
|
||||
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
||||
@ -429,7 +457,11 @@ clone and deploy it easily like this:</p>
|
||||
https://github.com/balkian/balkian.github.com <span class="nb">cd </span>balkian.github.com
|
||||
jekyll serve -w
|
||||
</pre></div>
|
||||
</td></tr></table><p>I will keep updating this post with information about: * Some Jekyll
|
||||
plugins that might be useful * What CSS tricks I learnt * The webfonts
|
||||
I used * The badge on the left side of the page</p>
|
||||
</td></tr></table><p>I will keep updating this post with information about:</p>
|
||||
<ul class="simple">
|
||||
<li>Some Jekyll plugins that might be useful</li>
|
||||
<li>What CSS tricks I learnt</li>
|
||||
<li>The webfonts I used</li>
|
||||
<li>The badge on the left side of the page</li>
|
||||
</ul>
|
||||
</summary><category term="starters"></category><category term="javascript"></category><category term="ruby"></category><category term="github"></category><category term="git"></category></entry></feed>
|
@ -122,11 +122,22 @@ memorability over describing the functionality.</p>
|
||||
</div>
|
||||
<div class="section" id="create-a-pypirc-configuration-file">
|
||||
<h2>Create a .pypirc configuration file</h2>
|
||||
<pre class="code cfg literal-block">
|
||||
<span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s">
|
||||
pypi # the live PyPI
|
||||
pypitest # test PyPI</span>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13</pre></div></td><td class="code"><div class="highlight"><pre><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
|
||||
<span class="na">index-servers</span> <span class="o">=</span><span class="s"></span>
|
||||
<span class="s"> pypi # the live PyPI</span>
|
||||
<span class="s"> pypitest # test PyPI</span>
|
||||
|
||||
<span class="err">[pypi]</span> <span class="c1"># authentication details for live PyPI</span>
|
||||
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://pypi.python.org/pypi</span>
|
||||
@ -136,8 +147,8 @@ memorability over describing the functionality.</p>
|
||||
<span class="err">[pypitest]</span> <span class="c1"># authentication details for test PyPI</span>
|
||||
<span class="na">repository</span> <span class="o">=</span> <span class="s">https://testpypi.python.org/pypi</span>
|
||||
<span class="na">username</span> <span class="o">=</span> <span class="s">{ your_username }</span>
|
||||
</pre>
|
||||
<p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi
|
||||
</pre></div>
|
||||
</td></tr></table><p>As you can see, you need to register both in the <a class="reference external" href="https://pypi.python.org/pypi?%3Aaction=register_form">main pypi
|
||||
repository</a> and
|
||||
the <a class="reference external" href="https://testpypi.python.org/pypi?%3Aaction=register_form">testing
|
||||
server</a>.
|
||||
@ -145,6 +156,7 @@ The usernames and passwords might be different, that is up to you!</p>
|
||||
</div>
|
||||
<div class="section" id="prepare-your-package">
|
||||
<h2>Prepare your package</h2>
|
||||
<p>This should be the structure:</p>
|
||||
<pre class="literal-block">
|
||||
root-dir/ # Any name you want
|
||||
setup.py
|
||||
@ -159,32 +171,48 @@ root-dir/ # Any name you want
|
||||
</pre>
|
||||
<div class="section" id="setup-cfg">
|
||||
<h3>setup.cfg</h3>
|
||||
<pre class="code cfg literal-block">
|
||||
<span class="k">[metadata]</span>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[metadata]</span>
|
||||
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
|
||||
</pre>
|
||||
<p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
||||
</pre></div>
|
||||
</td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can
|
||||
also use rST (reStructuredText), the standard in the python community.</p>
|
||||
</div>
|
||||
<div class="section" id="setup-py">
|
||||
<h3>setup.py</h3>
|
||||
<p>{% highlight python %} from distutils.core import setup setup( name =
|
||||
'mypackage', packages = ['mypackage'], # this must be the same as the
|
||||
name above version = '{ version }', description = '{ description }',
|
||||
author = '{ name }', author_email = '{ email }', url =
|
||||
'<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{package}', # URL to the github repo
|
||||
download_url = '<a class="reference external" href="https://github.com">https://github.com</a>/{user}/{repo}/tarball/{version}',
|
||||
keywords = ['websockets', 'display', 'd3'], # list of keywords that
|
||||
represent your package classifiers = [], ) {% endhighlight %}</p>
|
||||
<p>You might notice that the download_url points to a Github URL. We could
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span>
|
||||
|
||||
<span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">'mypackage'</span><span class="p">,</span>
|
||||
<span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s">'mypackage'</span><span class="p">],</span> <span class="c"># this must be the same as the name above</span>
|
||||
<span class="n">version</span> <span class="o">=</span> <span class="s">'{ version }'</span><span class="p">,</span>
|
||||
<span class="n">description</span> <span class="o">=</span> <span class="s">'{ description }'</span><span class="p">,</span>
|
||||
<span class="n">author</span> <span class="o">=</span> <span class="s">'{ name }'</span><span class="p">,</span>
|
||||
<span class="n">email</span> <span class="o">=</span> <span class="s">'{ email }'</span><span class="p">,</span>
|
||||
<span class="n">url</span> <span class="o">=</span> <span class="s">'https://github.com/{user}/{package}'</span><span class="p">,</span> <span class="c"># URL to the github repo</span>
|
||||
<span class="n">download</span>\<span class="n">_url</span> <span class="o">=</span> <span class="s">'https://github.com/{user}/{repo}/tarball/{version}'</span><span class="p">,</span>
|
||||
<span class="n">keywords</span> <span class="o">=</span> <span class="p">[</span><span class="s">'websockets'</span><span class="p">,</span> <span class="s">'display'</span><span class="p">,</span> <span class="s">'d3'</span><span class="p">],</span> <span class="c"># list of keywords that represent your package</span>
|
||||
<span class="n">classifiers</span> <span class="o">=</span> <span class="p">[],</span> <span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table><p>You might notice that the download_url points to a Github URL. We could
|
||||
host our package anywhere, but Github is a convenient option. To create
|
||||
the tarball and the zip packages, you only need to tag a tag in your
|
||||
repository and push it to github:</p>
|
||||
<pre class="literal-block">
|
||||
git tag {version} -m "{ Description of this tag/version}"
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2</pre></div></td><td class="code"><div class="highlight"><pre>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">"{ Description of this tag/version}"</span>
|
||||
git push --tags origin master
|
||||
</pre>
|
||||
</div>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<div class="section" id="push-to-the-testing-main-pypi-server">
|
||||
<h2>Push to the testing/main pypi server</h2>
|
||||
|
@ -239,16 +239,6 @@ div.navbar {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
.postnav {
|
||||
height: 1em;
|
||||
width: 100%;
|
||||
padding: 15px 9px;
|
||||
margin-left: -10px;
|
||||
background-color: white;
|
||||
text-align: right;
|
||||
border: dashed 1px #AAA;
|
||||
}
|
||||
|
||||
.previouspost {
|
||||
float: left;
|
||||
}
|
||||
|
@ -240,47 +240,11 @@ a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.postnav {
|
||||
height: 1em;
|
||||
width: 100%;
|
||||
padding: 15px 9px;
|
||||
margin-left: -10px;
|
||||
background-color: white;
|
||||
text-align: right;
|
||||
border: dashed 1px #AAA;
|
||||
}
|
||||
|
||||
.previouspost {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
.pagination {
|
||||
position: relative;
|
||||
height: 1em;
|
||||
width: 50%;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
background-color: #FFF;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.pag-top{
|
||||
/*margin: -9px auto;*/
|
||||
/*margin-bottom 0;*/
|
||||
/*border-radius: 0 0 15px 15px;*/
|
||||
/*border: dashed 1px #AAA;*/
|
||||
/*border-top-width: 0;*/
|
||||
}
|
||||
|
||||
.pag-bottom {
|
||||
bottom: -10px;
|
||||
/*margin: 0 auto;*/
|
||||
/*border-radius: 15px 15px 0 0;*/
|
||||
/*border: dashed 1px #AAA;*/
|
||||
/*border-bottom-width: 0;*/
|
||||
}
|
||||
|
||||
about ul {
|
||||
position: relative;
|
||||
width: 900px;
|
||||
|
@ -110,6 +110,14 @@ footer a:hover {
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
.postnav {
|
||||
height: 1em;
|
||||
width: 100%;
|
||||
padding: 15px 9px;
|
||||
margin-left: -10px;
|
||||
background-color: white;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.nextpost, .nextpage {
|
||||
float: right;
|
||||
@ -119,6 +127,22 @@ footer a:hover {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pag-top{
|
||||
/*margin: -9px auto;*/
|
||||
/*margin-bottom 0;*/
|
||||
/*border-radius: 0 0 15px 15px;*/
|
||||
/*border: dashed 1px #AAA;*/
|
||||
/*border-top-width: 0;*/
|
||||
}
|
||||
|
||||
.pag-bottom {
|
||||
bottom: -10px;
|
||||
/*margin: 0 auto;*/
|
||||
/*border-radius: 15px 15px 0 0;*/
|
||||
/*border: dashed 1px #AAA;*/
|
||||
/*border-bottom-width: 0;*/
|
||||
}
|
||||
|
||||
#social {
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
@ -200,21 +224,19 @@ footer a:hover {
|
||||
text-align: center;
|
||||
background-color: #FFF;
|
||||
z-index: 0;
|
||||
text-weight: bold;
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
.pag-top{
|
||||
margin: -9px auto;
|
||||
margin-bottom: 0;
|
||||
border-radius: 0 0 15px 15px;
|
||||
border: dashed 1px #AAA;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.pag-bottom {
|
||||
bottom: -10px;
|
||||
margin: 0 auto;
|
||||
border-radius: 15px 15px 0 0;
|
||||
border: dashed 1px #AAA;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
|
@ -127,9 +127,9 @@ new technologies and improve it:</p>
|
||||
<li>Automatic generation of fake personal data to test the interface</li>
|
||||
<li>Obfuscation of personal emails</li>
|
||||
</ul>
|
||||
<p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p>
|
||||
<div class="section" id="publishing-a-python-3-app-on-heroku">
|
||||
<h2>Publishing a Python 3 app on Heroku</h2>
|
||||
<p><a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a></p>
|
||||
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>mkvirtualenv -p /usr/bin/python3.3 eurolovemap
|
||||
</pre></div>
|
||||
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
|
||||
|
Loading…
Reference in New Issue
Block a user