You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Then try to reproduce the bug and exit <strong>pyradio</strong>.</p>
552
553
<p>Finally, include the file produced in your report.</p>
554
+
<h2id="packaging-pyradio">Packaging Pyradio <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
555
+
<p>If you are a packager and would like to produce a package for your distribution please do follow this mini guide.</p>
556
+
<p><strong>PyRadio</strong> is able to update and uninstall itself, when installed from sources.</p>
557
+
<p>This is something you do not want to be available when your package is used; <strong>PyRadio</strong> should be updated and uninstalled using the distro package manager.</p>
558
+
<p>In order to accomplice that, you just have to change the <strong>distro</strong> configuration parameter in the <strong>config</strong> file.</p>
559
+
<p><strong>PyRadio</strong> will read this parameter and will disable updating and uninstalling, when set to anything other than “<strong>None</strong>”.</p>
560
+
<p>So, here’s how you do that:</p>
561
+
<p>Once you are in the sources top level directory (typically “<em>pyradio</em>”), you execute the command:</p>
562
+
<pre>sed -i 's/distro = None/distro = YOUR DISTRO NAME' pyradio/config</pre>
563
+
<p>Then you go on to produce the package as you would normally do.</p>
564
+
<p>For example, an <strong>Arch Linux</strong> packager would use this command:</p>
<p>The distro name you insert here will appear in <strong>PyRadio</strong>’s log file, so that I know where the package came from while debugging, so if you are not packaging for a specific distribution, please do use something meaningful (for example, using “<em>xxx</em>” will do the job, but provides no useful information).</p>
553
567
<h2id="todo">TODO <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ Ben Dowling - [https://github.com/coderholic](https://github.com/coderholic)
29
29
*[Cleaning up](#cleaning-up)
30
30
*[Debug mode](#debug-mode)
31
31
*[Reporting bugs](#reporting-bugs)
32
+
*[Packagin PyRadio](#packaging-pyradio)
32
33
*[TODO](#todo)
33
34
*[Acknowlegement](#acknowlegement)
34
35
@@ -742,6 +743,36 @@ Then try to reproduce the bug and exit **pyradio**.
742
743
743
744
Finally, include the file produced in your report.
744
745
746
+
## Packaging Pyradio
747
+
748
+
If you are a packager and would like to produce a package for your distribution please do follow this mini guide.
749
+
750
+
**PyRadio** is able to update and uninstall itself, when installed from sources.
751
+
752
+
This is something you do not want to be available when your package is used; **PyRadio** should be updated and uninstalled using the distro package manager.
753
+
754
+
In order to accomplice that, you just have to change the **distro** configuration parameter in the **config** file.
755
+
756
+
**PyRadio** will read this parameter and will disable updating and uninstalling, when set to anything other than "**None**".
757
+
758
+
So, here's how you do that:
759
+
760
+
Once you are in the sources top level directory (typically "*pyradio*"), you execute the command:
761
+
762
+
```
763
+
sed -i 's/distro = None/distro = YOUR DISTRO NAME' pyradio/config
764
+
```
765
+
766
+
Then you go on to produce the package as you would normally do.
767
+
768
+
For example, an **Arch Linux** packager would use this command:
769
+
770
+
```
771
+
sed -i 's/distro = None/distro = Arch Linux' pyradio/config
772
+
```
773
+
774
+
The distro name you insert here will appear in **PyRadio**'s log file, so that I know where the package came from while debugging, so if you are not packaging for a specific distribution, please do use something meaningful (for example, using "*xxx*" will do the job, but provides no useful information).
<li>A pre-built package is not available to you.</li>
57
53
<li>You want to use a particular python version. For example, most pre-built packages nowadays are built using python 3.x. If for any reason you have to use python 2.x, this is the way to go.</li>
58
54
</ul>
59
-
<p>For the installation you will need <strong><em>git</em></strong>, <strong><em>setuptools</em></strong> (e.g. <em>python-setuptools</em>, <em>python3-setuptools</em> or <em>python2-setuptools</em>) and <strong><em>requests</em></strong> (e.g. <em>python-requests</em>, <em>python3-requests</em> or <em>python2-requests</em>) to be already installed.</p>
60
-
<p>Finally, you will use the <strong><em>build_install_pyradio</em></strong> script, located int the <strong><em>devel</em></strong> directory.</p>
61
-
<p>To see your options, execute:</p>
62
-
<pre>devel/build_install_pyradio -h</pre>
55
+
<p>For the installation you will need:</p>
56
+
<oltype="1">
57
+
<li><strong><em>setuptools</em></strong> (e.g. <em>python-setuptools</em>, <em>python3-setuptools</em> or <em>python2-setuptools</em>)</li>
58
+
<li><strong><em>requests</em></strong> (e.g. <em>python-requests</em>, <em>python3-requests</em> or <em>python2-requests</em>) to be already installed.</li>
59
+
</ol>
60
+
<p>The procedure presented here will not provide you with the sources; it will download and install them and then delete them. If you have to have <strong>PyRadio</strong>’s sources, you can just:</p>
<p>or download a zip from <strong>PyRadio</strong>’s <atarget="_blank" href="https://github.com/coderholic/pyradio">main page</a>.</p>
63
63
<h2id="preparing-for-the-installation">Preparing for the installation <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
64
64
<p>Before installing <strong>PyRadio</strong> you have to prepare your system, so that you end up with a working installation. The process depends on the OS you are on.</p>
65
65
<h3id="linux">Linux</h3>
66
-
<p>Use your distribution method to install <em>python-setuptools</em>, <em>python-requests</em>, <em>git</em>, <em>sed</em> and any one of <em>MPV</em>, <em>MPlayer</em> and/or <em>VLC</em>.</p>
66
+
<p>Use your distribution method to install <em>python-setuptools</em>, <em>python-requests</em>, <em>sed</em> and any one of <em>MPV</em>, <em>MPlayer</em> and/or <em>VLC</em>.</p>
67
67
<p>When you are done, proceed to “<ahref="#performing-the-installation">Performing the installation</a>”.</p>
68
68
<h3id="macos">macOS</h3>
69
69
<p>Everything you need to install, run and keep <strong>pyradio</strong> up-to-date is available on <atarget="_blank" href="https://github.com/Homebrew/homebrew">Homebrew</a>. If you haven’t already downloaded its client, go ahead and do it.</p>
<p>Your system is ready now for <strong>pyradio</strong> to be installed. You can follow the instructions given at “<ahref="#performing-the-installation">Performing the installation</a>”.</p>
91
89
<h2id="performing-the-installation">Performing the installation <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></style></h2>
92
-
<p>First thing you do is get the source. Open a <strong>terminal</strong> and type:</p>
<p><strong>Note</strong>: If you have neither <em>wget</em> or <em>curl</em> installed, just right click on <atarget="_blank" href="https://raw.githubusercontent.com/coderholic/pyradio/devel/pyradio/install.py">this link</a> and use your browser “<strong>Save as</strong>” menu entry to save the file in your home folder.</p>
97
+
<p>Finally, execute the command:</p>
98
+
<pre>python install.py</pre>
99
+
<p>On <strong>Debian</strong> based systems you will have to execute:</p>
100
+
<pre>python3 install.py</pre>
101
+
<p>If for some reason you want a <strong>python 2</strong> installation, execute:</p>
Copy file name to clipboardExpand all lines: build.md
+22-39Lines changed: 22 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,6 @@ Ben Dowling - [https://github.com/coderholic](https://github.com/coderholic)
12
12
* [macOS](#macos)
13
13
* [Windows](windows.md)
14
14
*[Performing the installation](#performing-the-installation)
15
-
*[Development version](#development-version)
16
-
*[Stable version](#stable-version)
17
15
*[Return to main doc](README.md)
18
16
19
17
## Building from source
@@ -23,28 +21,31 @@ Reasons to build from source
23
21
* A pre-built package is not available to you.
24
22
* You want to use a particular python version. For example, most pre-built packages nowadays are built using python 3.x. If for any reason you have to use python 2.x, this is the way to go.
25
23
26
-
For the installation you will need***git***, ***setuptools*** (e.g. *python-setuptools*, *python3-setuptools* or *python2-setuptools*) and ***requests*** (e.g. *python-requests*, *python3-requests* or *python2-requests*) to be already installed.
24
+
For the installation you will need:
27
25
28
-
Finally, you will use the ***build_install_pyradio*** script, located int the ***devel*** directory.
26
+
1.***setuptools*** (e.g. *python-setuptools*, *python3-setuptools* or *python2-setuptools*)
27
+
2.***requests*** (e.g. *python-requests*, *python3-requests* or *python2-requests*) to be already installed.
29
28
30
-
To see your options, execute:
29
+
The procedure presented here will not provide you with the sources; it will download and install them and then delete them. If you have to have **PyRadio**'s sources, you can just:
or download a zip from **PyRadio**'s [main page](https://github.com/coderholic/pyradio).
36
+
36
37
## Preparing for the installation
37
38
38
39
Before installing **PyRadio** you have to prepare your system, so that you end up with a working installation. The process depends on the OS you are on.
39
40
40
41
### Linux
41
42
42
-
Use your distribution method to install *python-setuptools*, *python-requests*, *git*, *sed* and any one of *MPV*, *MPlayer* and/or *VLC*.
43
+
Use your distribution method to install *python-setuptools*, *python-requests*, *sed* and any one of *MPV*, *MPlayer* and/or *VLC*.
43
44
44
45
When you are done, proceed to "[Performing the installation](#performing-the-installation)".
45
46
46
47
47
-
### macOS
48
+
### macOS
48
49
49
50
Everything you need to install, run and keep **pyradio** up-to-date is available on [Homebrew](https://github.com/Homebrew/homebrew). If you haven't already downloaded its client, go ahead and do it.
**Note**: If you have neither *wget* or *curl* installed, just right click on [this link](https://raw.githubusercontent.com/coderholic/pyradio/devel/pyradio/install.py) and use your browser "**Save as**" menu entry to save the file in your home folder.
133
120
134
-
This will report to you something similar to:
121
+
Finally, execute the command:
135
122
136
123
```
137
-
0.1
138
-
0.4
139
-
0.6.0
124
+
python install.py
140
125
```
141
126
142
-
Now is the time to pick a version.
143
-
144
-
For this example we will go with v. **0.6.0**.
127
+
On **Debian** based systems you will have to execute:
145
128
146
129
```
147
-
git checkout tags/0.6.0 -b 0.6.0
130
+
python3 install.py
148
131
```
149
132
150
-
Finally, build and install
133
+
If for some reason you want a **python 2** installation, execute:
0 commit comments