Skip to content

Commit 87bc095

Browse files
committed
Moved the metadata into PEP 621-compliant pyproject.toml. Dropped package building with Python 2 and old versions of Python 3 which are unsupported by setuptools that has PEP 621 implemented.
1 parent 0d52e98 commit 87bc095

File tree

3 files changed

+45
-41
lines changed

3 files changed

+45
-41
lines changed

.github/workflows/testing.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ jobs:
5555
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
5656
run: mypy imagehash tests/*.py --follow-imports=silent --ignore-missing-imports || true
5757
- name: build wheel
58+
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
5859
run: python3 -m build -nwx .
5960
- name: Install the built wheel
61+
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
6062
run: pip install --upgrade ./dist/*.whl
61-
- run: coverage run -m pytest .
63+
- run: coverage run -m pytest ./tests
6264
- name: Convert coverage output to lcov for coveralls
6365
# coverage-lcov requires python 3.6, so we cannot upload results
6466
# from python 2 and 3.5 builds :-(

pyproject.toml

+42-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
11
[build-system]
2-
requires = ["setuptools>=42.2"]
2+
requires = ["setuptools>=61.2"]
33
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "ImageHash"
7+
version = "4.3.0"
8+
authors = [{name = "Johannes Buchner", email = "[email protected]"}]
9+
license = {text = "BSD-2-Clause"}
10+
description = "Image Hashing library"
11+
readme = "README.rst"
12+
dependencies = ["numpy", "scipy", "pillow", "PyWavelets"]
13+
14+
[project.urls]
15+
Homepage = "https://github.com/JohannesBuchner/imagehash"
16+
17+
[project.optional-dependencies]
18+
testing = ["pytest>=3"]
19+
20+
[tool.setuptools]
21+
packages = ["imagehash"]
22+
script-files = ["find_similar_images.py"]
23+
include-package-data = true
24+
25+
[tool.setuptools.package-data]
26+
imagehash = ["py.typed"]
27+
28+
[tool.distutils.bdist_wheel]
29+
universal = 1
30+
31+
[tool.flake8]
32+
count = true
33+
statistics = true
34+
max-line-length = 127
35+
max-complexity = 10
36+
avoid-escape = true
37+
# This ignore differs than autopep8's ignore as to not autofix tabs to spaces, but still warn when mixed
38+
ignore = '''
39+
A001, ; variable "hash" is shadowing a python builtin
40+
W191,E111 ; tabs are prefered indentation;
41+
E117 ; Bug with pycodestyle for Python 2.7 where it thinks everything is over-indented with tabs'''
42+
per-file-ignores = """
43+
; False positive with multiline strings https://github.com/PyCQA/pycodestyle/issues/376
44+
find_similar_images.py: E101"""

setup.cfg

-39
This file was deleted.

0 commit comments

Comments
 (0)