add setup.py
This commit is contained in:
parent
c6a7d839d9
commit
12ff9b924e
@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import qasync
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from PyQt5 import QtWidgets
|
# let qasync figure out what Qt we are using - we dont care
|
||||||
from PyQt5.QtWidgets import (QProgressBar, QWidget, QVBoxLayout)
|
from qasync import QApplication, QtWidgets, QEventLoop
|
||||||
|
|
||||||
from phantompy import Render
|
from phantompy import Render
|
||||||
|
# if you want an example of looking for things in downloaded HTML:
|
||||||
# from lookupdns import LookFor as Render
|
# from lookupdns import LookFor as Render
|
||||||
from support_phantompy import vsetup_logging, omain_argparser
|
from support_phantompy import vsetup_logging, omain_argparser
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ class Widget(QtWidgets.QWidget):
|
|||||||
box = QtWidgets.QHBoxLayout()
|
box = QtWidgets.QHBoxLayout()
|
||||||
self.setLayout(box)
|
self.setLayout(box)
|
||||||
box.addWidget(self._label)
|
box.addWidget(self._label)
|
||||||
self.progress = QProgressBar()
|
self.progress = QtWidgets.QProgressBar()
|
||||||
self.progress.setRange(0, 99)
|
self.progress.setRange(0, 99)
|
||||||
box.addWidget(self.progress)
|
box.addWidget(self.progress)
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ def iMain(largs):
|
|||||||
vsetup_logging(oargs.log_level, logfile='', stream=sys.stderr)
|
vsetup_logging(oargs.log_level, logfile='', stream=sys.stderr)
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
app = QtWidgets.QApplication([])
|
app = QApplication([])
|
||||||
app.lstart = []
|
app.lstart = []
|
||||||
if bgui:
|
if bgui:
|
||||||
widget = Widget()
|
widget = Widget()
|
||||||
@ -89,7 +89,7 @@ def iMain(largs):
|
|||||||
else:
|
else:
|
||||||
widget = None
|
widget = None
|
||||||
|
|
||||||
loop = qasync.QEventLoop(app)
|
loop = QEventLoop(app)
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
|
|
||||||
url = oargs.html_url
|
url = oargs.html_url
|
||||||
|
22
setup.py
22
setup.py
@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*-mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
@ -8,28 +8,26 @@ long_description = "\n\n".join([
|
|||||||
open("README.md").read(),
|
open("README.md").read(),
|
||||||
])
|
])
|
||||||
|
|
||||||
setup(
|
if __name__ == '__main__':
|
||||||
name="pahntompy",
|
setup(
|
||||||
|
name="phantompy",
|
||||||
version=__version__,
|
version=__version__,
|
||||||
description="""A simple replacement for phantomjs using PyQt""",
|
description="""A simple replacement for phantomjs using PyQt""",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
author="Michael Franzl (originally) Goebel",
|
author="Michael Franzl (originally)",
|
||||||
author_email='',
|
author_email='',
|
||||||
license="1clause BSD",
|
license="1clause BSD",
|
||||||
packages=['phantompy'],
|
packages=['phantompy'],
|
||||||
# url="",
|
# url="",
|
||||||
# These are for reference only, pip is not able to download packages
|
# download_url="https://",
|
||||||
# from github because the archives do not include the project-name.
|
|
||||||
download_url="https://github.com/debops/yaml2rst/releases",
|
|
||||||
keywords=['JavaScript', 'phantomjs'],
|
keywords=['JavaScript', 'phantomjs'],
|
||||||
|
# maybe less - nothing fancy
|
||||||
python_requires=">=3.6",
|
python_requires=">=3.6",
|
||||||
# probably works on PyQt6 and PySide2 but untested
|
# probably works on PyQt6 and PySide2 but untested
|
||||||
|
# https://github.com/CabbageDevelopment/qasync/
|
||||||
install_requires=['qasync', 'PyQt5'],
|
install_requires=['qasync', 'PyQt5'],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': ['phantompy = phantompy.__main__:iMain', ]},
|
||||||
'phantompy = phantompy.__main__:iMain',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
@ -40,4 +38,4 @@ setup(
|
|||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Topic :: Software Development :: Documentation',
|
'Topic :: Software Development :: Documentation',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user