diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9aed930..f51020b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -55,10 +55,12 @@ jobs: if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }} run: mypy imagehash tests/*.py --follow-imports=silent --ignore-missing-imports || true - name: build wheel + if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }} run: python3 -m build -nwx . - name: Install the built wheel + if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }} run: pip install --upgrade ./dist/*.whl - - run: coverage run -m pytest . + - run: coverage run -m pytest ./tests - name: Convert coverage output to lcov for coveralls # coverage-lcov requires python 3.6, so we cannot upload results # from python 2 and 3.5 builds :-( diff --git a/pyproject.toml b/pyproject.toml index b464d1d..124c56a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,44 @@ [build-system] -requires = ["setuptools>=42.2"] +requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" + +[project] +name = "ImageHash" +version = "4.3.0" +authors = [{name = "Johannes Buchner", email = "buchner.johannes@gmx.at"}] +license = {text = "BSD-2-Clause"} +description = "Image Hashing library" +readme = "README.rst" +dependencies = ["numpy", "scipy", "pillow", "PyWavelets"] + +[project.urls] +Homepage = "https://github.com/JohannesBuchner/imagehash" + +[project.optional-dependencies] +testing = ["pytest>=3"] + +[tool.setuptools] +packages = ["imagehash"] +script-files = ["find_similar_images.py"] +include-package-data = true + +[tool.setuptools.package-data] +imagehash = ["py.typed"] + +[tool.distutils.bdist_wheel] +universal = 1 + +[tool.flake8] +count = true +statistics = true +max-line-length = 127 +max-complexity = 10 +avoid-escape = true +# This ignore differs than autopep8's ignore as to not autofix tabs to spaces, but still warn when mixed +ignore = ''' +A001, ; variable "hash" is shadowing a python builtin +W191,E111 ; tabs are prefered indentation; +E117 ; Bug with pycodestyle for Python 2.7 where it thinks everything is over-indented with tabs''' +per-file-ignores = """ +; False positive with multiline strings https://github.com/PyCQA/pycodestyle/issues/376 +find_similar_images.py: E101""" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b8d2052..0000000 --- a/setup.cfg +++ /dev/null @@ -1,39 +0,0 @@ -[metadata] -name = ImageHash -version = 4.3.0 -author = Johannes Buchner -author_email = buchner.johannes@gmx.at -license = BSD-2-Clause -description = Image Hashing library -url = https://github.com/JohannesBuchner/imagehash -long_description = file: README.rst -long_description_content_type = text/x-rst - -[bdist_wheel] -universal = 1 - -[options] -packages = imagehash -install_requires = numpy; scipy; pillow; PyWavelets -scripts = find_similar_images.py -test_suite = tests -tests_require = pytest>=3 - -[options.package_data] -imagehash = py.typed - -[flake8] -count = True -statistics = True -max-line-length = 127 -max-complexity = 10 -avoid-escape=True -; This ignore differs than autopep8's ignore as to not autofix tabs to spaces, but still warn when mixed -ignore= - A001, ; variable "hash" is shadowing a python builtin - W191,E111 ; tabs are prefered indentation; - E117 ; Bug with pycodestyle for Python 2.7 where it thinks everything is over-indented with tabs -per-file-ignores= - ; False positive with multiline strings https://github.com/PyCQA/pycodestyle/issues/376 - find_similar_images.py: E101 -