Skip to content

Commit

Permalink
Fixed pyproject.toml, and setup.py [issue #638]
Browse files Browse the repository at this point in the history
  • Loading branch information
emcconville committed Nov 5, 2023
1 parent 9050b47 commit cf475de
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 62 deletions.
15 changes: 11 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools>=61.0"
"setuptools>=68.0"
]
build-backend = "setuptools.build_meta"

Expand All @@ -14,7 +14,7 @@ maintainers = [
{name = "E. McConville", email = "[email protected]"},
]
description = "Ctypes-based simple MagickWand API binding for Python"
readme = "README.rst"
readme = { file = "README.rst", content-type = "text/x-rst" }
requires-python = ">=3.7"
keywords = ["ImageMagick", "ctypes"]
license = {text = "MIT License"}
Expand All @@ -31,7 +31,7 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: Implementation :: Stackless",
"Topic :: Multimedia :: Graphics"
"Topic :: Multimedia :: Graphics",
]
dynamic = ["version"]

Expand All @@ -46,5 +46,12 @@ Repository = "https://github.com/emcconville/wand"
Tracker = "https://github.com/emcconville/wand/issues"
Changelog = "https://docs.wand-py.org/en/latest/changes.html"

[tools.setuptools]
packages = ["wand", "wand.cdefs"]

[tool.setuptools.packages.find]
include = ["wand", "wand.cdefs"]
exclude = ["prof", "temp", "sample", "support"]

[tool.setuptools.dynamic]
version = {attr = "wand.version.VERSION"}
version = { attr = "wand.VERSION" }
53 changes: 0 additions & 53 deletions setup.cfg

This file was deleted.

25 changes: 20 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os
import os.path
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
from setuptools import setup, find_packages

sys.path.insert(0, '.')

from wand.version import VERSION

Expand Down Expand Up @@ -31,6 +31,18 @@ def run_tests(self):
raise SystemExit(errno)
cmdclass = {'test': pytest}

wand_includes = [
"wand",
"wand.cdefs"
]

wand_excludes = [
"prof", # CI Memory profile.
"temp", # CI artifacts.
"sample", # Old documents.
"support", # Non-public issues.
]

test_requires = [
'pytest >= 7.2.0',
]
Expand All @@ -41,7 +53,10 @@ def run_tests(self):

setup(
name='Wand',
packages=['wand', 'wand.cdefs'],
packages=find_packages(
include=wand_includes,
exclude=wand_excludes,
),
version=VERSION,
description='Ctypes-based simple MagickWand API binding for Python',
long_description=readme(),
Expand Down
1 change: 1 addition & 0 deletions wand/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.. _MagickWand API: http://www.imagemagick.org/script/magick-wand.php
"""
from .version import VERSION

0 comments on commit cf475de

Please sign in to comment.