Merge pull request #1 from undu/wheel
Enable Python binary paclaging of the code
This commit is contained in:
105
.gitignore
vendored
Normal file
105
.gitignore
vendored
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
.static_storage/
|
||||||
|
.media/
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
0
lector/__init__.py
Normal file
0
lector/__init__.py
Normal file
@@ -21,20 +21,19 @@ import sys
|
|||||||
import hashlib
|
import hashlib
|
||||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||||
|
|
||||||
import sorter
|
from lector import database
|
||||||
import database
|
from lector import sorter
|
||||||
|
from lector.toolbars import LibraryToolBar, BookToolBar
|
||||||
|
from lector.widgets import Tab
|
||||||
|
from lector.delegates import LibraryDelegate
|
||||||
|
from lector.threaded import BackGroundTabUpdate, BackGroundBookAddition, BackGroundBookDeletion
|
||||||
|
from lector.library import Library
|
||||||
|
from lector.settings import Settings
|
||||||
|
from lector.settingsdialog import SettingsUI
|
||||||
|
from lector.metadatadialog import MetadataUI
|
||||||
|
from lector.definitionsdialog import DefinitionsUI
|
||||||
|
|
||||||
from resources import mainwindow, resources
|
from resources import mainwindow
|
||||||
from toolbars import LibraryToolBar, BookToolBar
|
|
||||||
from widgets import Tab
|
|
||||||
from delegates import LibraryDelegate
|
|
||||||
from threaded import BackGroundTabUpdate, BackGroundBookAddition, BackGroundBookDeletion
|
|
||||||
from library import Library
|
|
||||||
from settings import Settings
|
|
||||||
|
|
||||||
from settingsdialog import SettingsUI
|
|
||||||
from metadatadialog import MetadataUI
|
|
||||||
from definitionsdialog import DefinitionsUI
|
|
||||||
|
|
||||||
|
|
||||||
class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
|
class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
|
@@ -21,8 +21,8 @@ import pickle
|
|||||||
import pathlib
|
import pathlib
|
||||||
from PyQt5 import QtGui, QtCore
|
from PyQt5 import QtGui, QtCore
|
||||||
|
|
||||||
import database
|
from lector import database
|
||||||
from models import TableProxyModel, ItemProxyModel
|
from lector.models import TableProxyModel, ItemProxyModel
|
||||||
|
|
||||||
|
|
||||||
class Library:
|
class Library:
|
@@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
from PyQt5 import QtWidgets, QtCore, QtGui
|
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||||
|
|
||||||
import database
|
from lector import database
|
||||||
|
|
||||||
from resources import metadata
|
from resources import metadata
|
||||||
from widgets import PliantQGraphicsScene
|
from lector.widgets import PliantQGraphicsScene
|
||||||
|
|
||||||
|
|
||||||
class MetadataUI(QtWidgets.QDialog, metadata.Ui_Dialog):
|
class MetadataUI(QtWidgets.QDialog, metadata.Ui_Dialog):
|
@@ -23,10 +23,11 @@ import os
|
|||||||
import copy
|
import copy
|
||||||
from PyQt5 import QtWidgets, QtCore
|
from PyQt5 import QtWidgets, QtCore
|
||||||
|
|
||||||
import database
|
from lector import database
|
||||||
|
from lector.models import MostExcellentFileSystemModel
|
||||||
|
from lector.threaded import BackGroundBookSearch, BackGroundBookAddition
|
||||||
|
|
||||||
from resources import settingswindow
|
from resources import settingswindow
|
||||||
from models import MostExcellentFileSystemModel, FileSystemProxyModel
|
|
||||||
from threaded import BackGroundBookSearch, BackGroundBookAddition
|
|
||||||
|
|
||||||
|
|
||||||
class SettingsUI(QtWidgets.QDialog, settingswindow.Ui_Dialog):
|
class SettingsUI(QtWidgets.QDialog, settingswindow.Ui_Dialog):
|
@@ -42,7 +42,7 @@ import threading
|
|||||||
from multiprocessing import Pool, Manager
|
from multiprocessing import Pool, Manager
|
||||||
from PyQt5 import QtCore, QtGui
|
from PyQt5 import QtCore, QtGui
|
||||||
|
|
||||||
import database
|
from lector import database
|
||||||
|
|
||||||
from parsers.cbz import ParseCBZ
|
from parsers.cbz import ParseCBZ
|
||||||
from parsers.cbr import ParseCBR
|
from parsers.cbr import ParseCBR
|
@@ -21,8 +21,8 @@ import pathlib
|
|||||||
from multiprocessing.dummy import Pool
|
from multiprocessing.dummy import Pool
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
|
|
||||||
import sorter
|
from lector import sorter
|
||||||
import database
|
from lector import database
|
||||||
|
|
||||||
|
|
||||||
class BackGroundTabUpdate(QtCore.QThread):
|
class BackGroundTabUpdate(QtCore.QThread):
|
@@ -26,10 +26,9 @@ import os
|
|||||||
import uuid
|
import uuid
|
||||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||||
|
|
||||||
from resources import pie_chart
|
from lector.models import BookmarkProxyModel
|
||||||
from models import BookmarkProxyModel
|
from lector.sorter import resize_image
|
||||||
from sorter import resize_image
|
from lector.delegates import BookmarkDelegate
|
||||||
from delegates import BookmarkDelegate
|
|
||||||
|
|
||||||
|
|
||||||
class Tab(QtWidgets.QWidget):
|
class Tab(QtWidgets.QWidget):
|
5
setup.cfg
Normal file
5
setup.cfg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[bdist_wheel]
|
||||||
|
# This flag says that the code is written to work on both Python 2 and Python
|
||||||
|
# 3. If at all possible, it is good practice to do this. If you cannot, you
|
||||||
|
# will need to generate wheels for each Python version that you support.
|
||||||
|
universal=1
|
80
setup.py
Normal file
80
setup.py
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
import codecs
|
||||||
|
from os import path
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
HERE = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
|
# Get the long description from the README file
|
||||||
|
with codecs.open(path.join(HERE, 'README.md'), encoding='utf-8') as f:
|
||||||
|
LONG_DESC = f.read()
|
||||||
|
|
||||||
|
INSTALL_DEPS = ['PyQt5==5.10.1',
|
||||||
|
'requests==2.18.4',
|
||||||
|
'beautifulsoup4==4.6.0']
|
||||||
|
TEST_DEPS = ['pytest',
|
||||||
|
'unittest2']
|
||||||
|
DEV_DEPS = []
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='lector',
|
||||||
|
|
||||||
|
# https://pypi.python.org/pypi/setuptools_scm
|
||||||
|
use_scm_version=True,
|
||||||
|
|
||||||
|
description='Qt-based ebook reader',
|
||||||
|
long_description=LONG_DESC,
|
||||||
|
|
||||||
|
url='https://github.com/BasioMeusPuga/Lector',
|
||||||
|
|
||||||
|
author='BasioMeusPuga',
|
||||||
|
author_email='disgruntled.mob@gmail.com',
|
||||||
|
|
||||||
|
license='GPL v3.0',
|
||||||
|
|
||||||
|
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||||
|
classifiers=[
|
||||||
|
# How mature is this project? Common values are
|
||||||
|
# 3 - Alpha
|
||||||
|
# 4 - Beta
|
||||||
|
# 5 - Production/Stable
|
||||||
|
'Development Status :: 3 - Alpha',
|
||||||
|
|
||||||
|
'Intended Audience :: End Users/Desktop',
|
||||||
|
|
||||||
|
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
||||||
|
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Programming Language :: Python :: 3.4',
|
||||||
|
'Programming Language :: Python :: 3.5',
|
||||||
|
'Programming Language :: Python :: 3.6',
|
||||||
|
],
|
||||||
|
|
||||||
|
# What does your project relate to?
|
||||||
|
keywords='qt ebook epub kindle',
|
||||||
|
|
||||||
|
packages=find_packages(),
|
||||||
|
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': [
|
||||||
|
'lector = lector.__main__:main'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
# List run-time dependencies here. These will be installed by pip when
|
||||||
|
# your project is installed. For an analysis of "install_requires" vs pip's
|
||||||
|
# requirements files see:
|
||||||
|
# https://packaging.python.org/en/latest/requirements.html
|
||||||
|
install_requires=INSTALL_DEPS,
|
||||||
|
|
||||||
|
setup_requires=['setuptools_scm'],
|
||||||
|
|
||||||
|
python_requires='>=3.4, <4.0',
|
||||||
|
|
||||||
|
# List additional groups of dependencies here (e.g. development
|
||||||
|
# dependencies). You can install these using the following syntax,
|
||||||
|
# for example:
|
||||||
|
# $ pip install -e .[dev,test]
|
||||||
|
extras_require={
|
||||||
|
'dev': DEV_DEPS,
|
||||||
|
'test': TEST_DEPS
|
||||||
|
},
|
||||||
|
)
|
Reference in New Issue
Block a user