From a46bcb00fa6d09d79400079ab1e2e189c4956033 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 10 Jun 2022 11:12:04 -0700 Subject: [PATCH] Update WebAppify to the latest tech - Migrate to Hatch - Migrate to Woodpecker CI --- .drone.yml | 10 ----- .gitignore | 5 ++- .woodpecker.yml | 23 +++++++++++ pyproject.toml | 58 +++++++++++++++++++++++++++ setup.cfg | 5 --- setup.py | 45 --------------------- webappify.py => webappify/__init__.py | 0 7 files changed, 85 insertions(+), 61 deletions(-) delete mode 100644 .drone.yml create mode 100644 .woodpecker.yml create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py rename webappify.py => webappify/__init__.py (100%) diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 76eb74a..0000000 --- a/.drone.yml +++ /dev/null @@ -1,10 +0,0 @@ -kind: pipeline -name: default - -steps: -- name: test - image: python:3 - commands: - - pip install -e . - - pip install pytest - - pytest diff --git a/.gitignore b/.gitignore index 3a34b64..61d5f42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ -dist *.egg-info +dist build +.venv +__pycache__ +*.py[co] diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..11711a4 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,23 @@ +pipeline: + tests: + image: python:3 + commands: + - pip install -U pip wheel pytest PyQt5 PyQtWebEngine + - pytest + when: + branch: master + build: + image: python:3 + commands: + - pip install -U pip wheel hatch hatch-vcs + - hatch build + when: + branch: master + release: + image: python:3 + commands: + - pip install -U pip wheel hatch hatch-vcs + - hatch build + - hatch publish + when: + event: tag diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b3bbef5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,58 @@ +[build-system] +requires = [ + "hatchling>=1.3.1", +] +build-backend = "hatchling.build" + +[project] +name = "WebAppify" +description = "Create desktop apps of your favourite websites" +readme = "README.rst" +license = "MIT" +authors = [ + { name = "Raoul Snyman", email = "raoul@snyman.info" }, +] +keywords = [ + "Qt", + "website", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: MacOS X", + "Environment :: Win32 (MS Windows)", + "Environment :: X11 Applications", + "Environment :: X11 Applications :: Qt", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Topic :: Desktop Environment", + "Topic :: Internet :: WWW/HTTP :: Browsers", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "PyQt5", + "PyQtWebEngine", +] +dynamic = [ + "version", +] + +[project.urls] +Homepage = "https://git.snyman.info/raoul/webappify" + +[tool.hatch.version] +path = "webappify/version.py" + +[tool.hatch.build] +include = [ + "/webappify", +] + +[tool.hatch.build.targets.sdist] +[tool.hatch.build.targets.bdist] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 96a01b4..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[wheel] -universal = 1 - -[flake8] -max-line-length = 120 diff --git a/setup.py b/setup.py deleted file mode 100644 index c045526..0000000 --- a/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -""" -The webappify package -""" -import os -from codecs import open -from setuptools import setup - -HERE = os.path.abspath(os.path.dirname(__file__)) - -with open(os.path.join(HERE, 'README.rst'), encoding='utf8') as f: - LONG_DESCRIPTION = f.read() - - -setup( - name='WebAppify', - version='0.3', - description='Create desktop apps of your favourite websites', - long_description=LONG_DESCRIPTION, - url='https://launchpad.net/webappify', - author='Raoul Snyman', - author_email='raoul@snyman.info', - license='MIT', - classifiers=[ - 'Development Status :: 4 - Beta', - 'Environment :: MacOS X', - 'Environment :: Win32 (MS Windows)', - 'Environment :: X11 Applications', - 'Environment :: X11 Applications :: Qt', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Topic :: Desktop Environment', - 'Topic :: Internet :: WWW/HTTP :: Browsers', - 'Topic :: Software Development :: Libraries :: Python Modules' - ], - keywords='Qt website', - py_modules=['webappify'], - install_requires=['PyQt5', 'PyQtWebEngine'] -) diff --git a/webappify.py b/webappify/__init__.py similarity index 100% rename from webappify.py rename to webappify/__init__.py