BasioMeusPuga / Lector

Qt based ebook reader
GNU General Public License v3.0
1.52k stars 209 forks source link

Enable Python binary paclaging of the code #1

Closed undu closed 6 years ago

undu commented 6 years ago

These changes set up the groundwork to create a python package for lector, ready for uploading to pypi, so it could be installed with pip install lector.

Since there are no tests I can't tell for sure if nothing broke, the basics ran well for me.

To build the package, pip install wheel setuptools && python setup.py bdist_wheel A package should appear in dist/ that is installable with pip install dist/*.whl, what's next is running the the program with a simple command, lector :)

For uploading the package to pipy twine is needed.

For more information about packaging don't hesistate to check https://packaging.python.org/tutorials/distributing-packages/

I took the liberty to add a trick to setup.py so the python package version follows git tags name. This means that 0.x can be built by doing g co tag, then building the package.