Skip to content

Commit 930338f

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 930338f

File tree

3 files changed

+30
-27
lines changed

3 files changed

+30
-27
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

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
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

setup.cfg

-25
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
[metadata]
2-
name = ImageHash
3-
version = 4.3.0
4-
author = Johannes Buchner
5-
author_email = [email protected]
6-
license = BSD-2-Clause
7-
description = Image Hashing library
8-
url = https://github.com/JohannesBuchner/imagehash
9-
long_description = file: README.rst
10-
long_description_content_type = text/x-rst
11-
12-
[bdist_wheel]
13-
universal = 1
14-
15-
[options]
16-
packages = imagehash
17-
install_requires = numpy; scipy; pillow; PyWavelets
18-
scripts = find_similar_images.py
19-
test_suite = tests
20-
tests_require = pytest>=3
21-
22-
[options.package_data]
23-
imagehash = py.typed
24-
251
[flake8]
262
count = True
273
statistics = True
@@ -36,4 +12,3 @@ ignore=
3612
per-file-ignores=
3713
; False positive with multiline strings https://github.com/PyCQA/pycodestyle/issues/376
3814
find_similar_images.py: E101
39-

0 commit comments

Comments
 (0)