From 9e7ccce550118262832dc3d2d3ad795a407f9933 Mon Sep 17 00:00:00 2001 From: Andrew DeOrio Date: Wed, 15 Feb 2023 10:01:28 -0500 Subject: [PATCH 1/5] Partially working pyproject.toml --- pyproject.toml | 28 ++++++++++++++++++++++++++ setup.py | 53 -------------------------------------------------- 2 files changed, 28 insertions(+), 53 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fd281c5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,28 @@ +[build-system] +requires = ["setuptools>=64.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "mailmerge" +version = "2.2.1" +description = "A simple, command line mail merge tool" +keywords = ["mail merge", "mailmerge", "email"] +authors = [{ email = "awdeorio@umich.edu" }, { name = "Andrew DeOrio" }] +license = {file = "LICENSE"} +readme = "README.md" +requires-python = ">=3.6" +dependencies = [ + "click", + "jinja2", + "markdown", + "html5lib" +] + +# [project.scripts] +# mailmerge = mailmerge.__main__:main + +[tool.setuptools] +packages = ["mailmerge"] + +[tool.poetry] +homepage = "https://github.com/awdeorio/mailmerge/" diff --git a/setup.py b/setup.py deleted file mode 100644 index a828bc6..0000000 --- a/setup.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Mailmerge build and install configuration.""" -from pathlib import Path -import setuptools - - -# Read the contents of README file -PROJECT_DIR = Path(__file__).parent -README = PROJECT_DIR/"README.md" -LONG_DESCRIPTION = README.open(encoding="utf8").read() - - -setuptools.setup( - name="mailmerge", - description="A simple, command line mail merge tool", - long_description=LONG_DESCRIPTION, - long_description_content_type="text/markdown", - version="2.2.1", - author="Andrew DeOrio", - author_email="awdeorio@umich.edu", - url="https://github.com/awdeorio/mailmerge/", - license="MIT", - packages=["mailmerge"], - keywords=["mail merge", "mailmerge", "email"], - install_requires=[ - "click", - "jinja2", - "markdown", - "html5lib" - ], - extras_require={ - "dev": [ - "pdbpp", - "twine", - "tox", - ], - "test": [ - "check-manifest", - "freezegun", - "pycodestyle", - "pydocstyle", - "pylint", - "pytest", - "pytest-cov", - "pytest-mock", - ], - }, - python_requires='>=3.6', - entry_points={ - "console_scripts": [ - "mailmerge = mailmerge.__main__:main", - ] - }, -) From 4114b65e7c80d966bae168d8879d73c125fc519a Mon Sep 17 00:00:00 2001 From: Andrew DeOrio Date: Wed, 15 Feb 2023 10:05:31 -0500 Subject: [PATCH 2/5] scripts --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fd281c5..59c3130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,8 @@ dependencies = [ "html5lib" ] -# [project.scripts] -# mailmerge = mailmerge.__main__:main +[project.scripts] +mailmerge = "mailmerge.__main__:main" [tool.setuptools] packages = ["mailmerge"] From 5cbfdb24d47ceed22b0235eeb32af390ddbd190a Mon Sep 17 00:00:00 2001 From: Andrew DeOrio Date: Wed, 15 Feb 2023 10:06:27 -0500 Subject: [PATCH 3/5] avoid poetry --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 59c3130..20e4444 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,8 +21,8 @@ dependencies = [ [project.scripts] mailmerge = "mailmerge.__main__:main" +[project.urls] +homepage = "https://github.com/awdeorio/mailmerge/" + [tool.setuptools] packages = ["mailmerge"] - -[tool.poetry] -homepage = "https://github.com/awdeorio/mailmerge/" From 3954ae806a2193b93cb4a9c03c4e353147caab89 Mon Sep 17 00:00:00 2001 From: Andrew DeOrio Date: Wed, 15 Feb 2023 10:08:30 -0500 Subject: [PATCH 4/5] optional dependencies --- pyproject.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 20e4444..6737548 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,23 @@ dependencies = [ "html5lib" ] +[project.optional-dependencies] +dev = [ + "pdbpp", + "twine", + "tox", +] +test = [ + "check-manifest", + "freezegun", + "pycodestyle", + "pydocstyle", + "pylint", + "pytest", + "pytest-cov", + "pytest-mock", +] + [project.scripts] mailmerge = "mailmerge.__main__:main" From 6b5d7d30911452d44338956c9aa91e9b599c3bbb Mon Sep 17 00:00:00 2001 From: Andrew DeOrio Date: Wed, 15 Feb 2023 10:10:56 -0500 Subject: [PATCH 5/5] Support legacy tools --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d037f14 --- /dev/null +++ b/setup.py @@ -0,0 +1,5 @@ +"""Support legacy tools.""" + +from setuptools import setup + +setup()