-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create setup.py file. Prepare for release of Debian package.
- Loading branch information
Showing
13 changed files
with
180 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,7 @@ ENV/ | |
|
||
# Folder with experimental tests | ||
exp/* | ||
|
||
deb_dist/ | ||
|
||
adblockradio*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include CHANGELOG.md | ||
include LICENSE | ||
include Makefile | ||
include README.txt | ||
include requirements.txt | ||
recursive-include adblockradio/ui/svg *.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,47 @@ | ||
PYTHON = /usr/bin/python3 | ||
NAME = `/usr/bin/python3 setup.py --name` | ||
USERNAME := $(shell whoami) | ||
|
||
init: | ||
$(PYTHON) -m pip install -r requirements.txt | ||
sudo apt-get install pyqt4-dev-tools qt4-designer | ||
sudo apt-get install python3-stdeb fakeroot python3-all | ||
|
||
dist: source deb | ||
|
||
source: | ||
$(PYTHON) setup.py sdist | ||
|
||
deb: | ||
$(PYTHON) setup.py --command-packages=stdeb.command bdist_deb | ||
|
||
debsrc: | ||
$(PYTHON) setup.py --command-packages=stdeb.command sdist_dsc | ||
|
||
rpm: | ||
$(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall | ||
|
||
check: | ||
# pyflakes adblockradio/*.py | ||
# find adblockradio/ -name \*.py | grep -v "^test_" | xargs pylint --errors-only --reports=n | grep -v "PyQt4" | ||
# pep8 | ||
# pyntch | ||
# pychecker | ||
# pymetrics | ||
|
||
clean: | ||
$(PYTHON) setup.py clean | ||
rm -rf build/ MANIFEST dist build adblockradio.egg-info deb_dist | ||
find . -name '*.pyc' -delete | ||
|
||
develop : adblockradio.py | ||
sudo apt-get install python3-pip python3-pyqt4 gstreamer1.0-plugins-base gstreamer1.0-plugins-good python3-gst-1.0 | ||
$(PYTHON) -m pip install appdirs plac requests | ||
sed -i -e "s|/home/user/|/home/$(USERNAME)/|g" share/adblockradio.desktop | ||
sudo cp share/adblockradio.desktop /usr/share/applications | ||
|
||
# Compile Qt designs to python classes | ||
ui/ui_text_item_editor.py : ui/ui_text_item_editor.ui | ||
pyuic4 ui/ui_text_item_editor.ui -o ui/ui_text_item_editor.py | ||
|
||
.PHONY: init dist source deb rpm check clean develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AdBlockRadio - Internet radio player that blocks advertisements. | ||
|
||
Detects advertisements by inspecting song titles inside stream metadata | ||
and switches automatically to another radio station, when an ad is | ||
detected. | ||
|
||
Requirements: Python 3.4, GStreamer 1.X with python bindings, PyQt4, appdirs, plac, requests. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
appdirs==1.4.0 | ||
plac==0.9.6 | ||
requests==2.9.1 | ||
stdeb==0.8.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
from setuptools import setup, find_packages | ||
|
||
|
||
def read_long_description(): | ||
with open('README.txt') as f: | ||
return f.read() | ||
|
||
|
||
osname = os.uname()[0] | ||
if any([name for name in ['Darwin', 'Linux'] if osname in name]): | ||
data_files = [ | ||
('/usr/share/applications', ['share/adblockradio.desktop']), | ||
('/usr/share/adblockradio', ['share/icon.svg']) | ||
] | ||
else: | ||
data_files = [] | ||
|
||
|
||
setup( | ||
name='adblockradio', | ||
version='0.3', | ||
author='QuaSoft', | ||
author_email='[email protected]', | ||
description='Internet radio player for Ubuntu that blocks advertisements', | ||
long_description=read_long_description(), | ||
license='GPLv3', | ||
keywords='music internet radio player block advertisements', | ||
url='https://github.com/quasoft/adblockradio', | ||
packages=find_packages(), | ||
package_data={ | ||
'adblockradio': [ | ||
'adblockradio/ui/svg/*.svg' | ||
] | ||
}, | ||
include_package_data=True, | ||
data_files=data_files, | ||
entry_points={ | ||
'console_scripts': [ | ||
'adblockradio=adblockradio.adblockradio:main' | ||
] | ||
}, | ||
download_url='https://github.com/quasoft/adblockradio/archive/0.3.tar.gz', | ||
install_requires=['appdirs', 'requests'], | ||
extras_require={ | ||
'console': ['plac'] | ||
}, | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', | ||
'Intended Audience :: End Users/Desktop', | ||
'Topic :: Multimedia :: Audio', | ||
'Topic :: Utilities' | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Version=0.3 | ||
Name=Ad Block Radio | ||
Comment=Internet radio player that blocks advertisements. | ||
Exec=/usr/bin/python3 adblockradio.py | ||
Path=/home/user/adblockradio/ | ||
Icon=/home/user/adblockradio/ui/svg/icon.svg | ||
Exec=adblockradio | ||
Icon=/usr/share/adblockradio/icon.svg | ||
Terminal=false | ||
Type=Application | ||
Categories=Application; | ||
Categories=Application;AudioVideo;Audio;Music; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[DEFAULT] | ||
Depends3: python3-pyqt4, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-ugly, python3-gst-1.0 | ||
XS-Python-Version: >= 3.4 | ||
Suite: xenial | ||
Section: sound |