From b9f0517f833bde81b8851b19f7d12cb109a3a121 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 3 Sep 2024 18:06:04 +0100 Subject: [PATCH] argh --- .github/workflows/publish.yml | 2 +- .github/workflows/tests.yml | 2 +- pyproject.toml | 41 ++++++++++++++++++++++++++++++++ setup.py | 44 ----------------------------------- 4 files changed, 43 insertions(+), 46 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 230013f..f3b182c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.8' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4aaeeae..6290292 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8"] steps: - name: Checkout diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e1cdbb5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[project] +name = "sikulpy" +version = "0.0" +authors = [{ name = "Shish", email = "shish@shishnet.org" }] +description = "An implementation of Sikuli for CPython" +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "autopy>=4.0.0", + "pillow", + "numpy", + "mss", + "pyperclip", + "opencv-python", +] + +[project.urls] +Homepage = "https://github.com/shish/sikulpy" + +[project.optional-dependencies] +dev = ["ruff", "mypy", "pytest-cov", "types-Pillow"] + +[tool.setuptools] +py-modules = ["sikuli"] + +[tool.pytest.ini_options] +addopts = "--cov --cov-report term-missing --cov-fail-under 95" + +[tool.coverage.run] +source = ["sikuli"] + +[tool.mypy] +files = "sikuli" + +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project.scripts] +sikulpy = "sikuli.run:main" +sikulpy-find = "sikuli.find:main" diff --git a/setup.py b/setup.py deleted file mode 100644 index 031e6c1..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python - -import setuptools -from distutils.core import setup - -with open("README.md", "r") as fh: - long_description = fh.read() - -setup( - name='sikulpy', - version='0.0', - description='An implementation of Sikuli for CPython', - long_description=long_description, - long_description_content_type="text/markdown", - author='Shish', - author_email='webmaster@shishnet.org', - install_requires=[ - "autopy>=4.0.0", - "pillow", - "numpy", - "mss", - "pyperclip", - "opencv-python", - ], - url='https://github.com/shish/sikulpy', - classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Console", - "Intended Audience :: Developers", - "Programming Language :: Python :: 3.7", - "Topic :: Utilities", - ], - packages=[ - "sikuli", - "sikuli.script", - ], - entry_points={ - 'console_scripts': [ - 'sikulpy = sikuli.run:main', - 'sikulpy-find = sikuli.find:main', - ], - 'gui_script': [] - }, -)