Code refactoring before publishing on PyPI

This commit is contained in:
Michal Krenek (Mikos) 2015-04-24 16:26:42 +02:00
parent 2de494dc23
commit 405e6679c8
6 changed files with 31 additions and 13 deletions

9
.gitignore vendored
View File

@ -1,5 +1,6 @@
# Backup files
*~
# Compiled Python files
__pycache__/
*.py[cod]
build/
dist/
MANIFEST

2
MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include LICENSE
include README.rst

View File

@ -6,7 +6,7 @@ Spectrum analyzer for RTL-SDR (GUI for rtl_power based on PyQtGraph)
Screenshot
----------
![QSpectrumAnalyzer](https://xmikos.github.io/qspectrumanalyzer/qspectrumanalyzer_screenshot.png)
.. image:: https://xmikos.github.io/qspectrumanalyzer/qspectrumanalyzer_screenshot.png
Requirements
------------
@ -17,16 +17,16 @@ Requirements
- rtl-sdr (https://github.com/keenerd/rtl-sdr)
You should use Keenerds fork of rtl-sdr (latest Git revision),
bacause `rtl_power` in original rtl-sdr (from osmocom.org) is broken
bacause ``rtl_power`` in original rtl-sdr (from osmocom.org) is broken
(especially when used with cropping).
Usage
-----
Start QSpectrumAnalyzer by running `qspectrumanalyzer`.
Start QSpectrumAnalyzer by running ``qspectrumanalyzer``.
If you don't have `rtl_power` executable in system path, you can specify
location of it manually in _File_ -> _Settings_. You can also specify waterfall
If you don't have ``rtl_power`` executable in system path, you can specify
location of it manually in *File* -> *Settings*. You can also specify waterfall
plot history size in there. Default is 100 lines, be aware that really large
sweeps (with a lot of bins) would require a lot of system memory, so don't make
this number too big.
@ -34,7 +34,7 @@ this number too big.
Controls should be intuitive, but if you want consistent results, you should
turn off automatic gain control (set it to some fixed number) and also set
crop to 20% or more. For finding out ppm correction factor for your rtl-sdr
stick, use [kalibrate-rtl](https://github.com/steve-m/kalibrate-rtl).
stick, use `kalibrate-rtl <https://github.com/steve-m/kalibrate-rtl>`_.
You can move and zoom plot with mouse, change plot settings or export plots
from right-click menu. Waterfall plot black/white levels and color lookup

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
from qspectrumanalyzer import qspectrumanalyzer
qspectrumanalyzer.main()
from qspectrumanalyzer import __main__
__main__.main()

View File

@ -14,4 +14,19 @@ setup(name="QSpectrumAnalyzer",
data_files=[("share/applications", ["qspectrumanalyzer.desktop"]),
("share/pixmaps", ["qspectrumanalyzer.png"])],
scripts=["scripts/qspectrumanalyzer"],
requires=["PyQt4", "pyqtgraph"])
requires=["PyQt4", "pyqtgraph"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications :: Qt',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Science/Research',
'Intended Audience :: Telecommunications Industry',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Communications :: Ham Radio',
'Topic :: Scientific/Engineering :: Visualization'
])