From 24b38e4ffe788eb621db987f1034f5bb95cc64a7 Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Tue, 17 Aug 2021 18:53:56 -0500 Subject: [PATCH] Update to use pyproject.toml & setup.cfg --- pyproject.toml | 6 ++++++ setup.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++++ setup.py | 49 ------------------------------------------------- 3 files changed, 51 insertions(+), 49 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5067247 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = ["setuptools >= 40.6.0", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 120 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4fbf5be --- /dev/null +++ b/setup.cfg @@ -0,0 +1,45 @@ +[metadata] +name = Send2Trash +version = 1.8.0 +url = https://github.com/arsenetar/send2trash +project_urls = + Bug Reports = https://github.com/arsenetar/send2trash/issues +author = Andrew Senetar +author_email = arsenetar@voltaicideas.net +license = BSD License +license_files = LICENSE +description = Send file to trash natively under Mac OS X, Windows and Linux +long_description = file:README.rst +long_description_content_type = text/x-rst +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: BSD License + Operating System :: MacOS :: MacOS X + Operating System :: Microsoft :: Windows + Operating System :: POSIX + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Topic :: Desktop Environment :: File Managers + +[options] +packages = send2trash +tests_require = pytest + +[options.extras_require] +win32 = pywin32; sys_platform == "win32" +objc = pyobjc-framework-Cocoa; sys_platform == "darwin" +nativeLib = + pywin32; sys_platform == "win32" + pyobjc-framework-Cocoa; sys_platform == "darwin" + +[options.entry_points] +console_scripts = + send2trash = send2trash.__main__:main \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 8096a1d..0000000 --- a/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -from setuptools import setup - -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Desktop Environment :: File Managers", -] - -with open("README.rst", "rt") as f1, open("CHANGES.rst", "rt") as f2: - LONG_DESCRIPTION = f1.read() + "\n\n" + f2.read() - -setup( - name="Send2Trash", - version="1.8.0", - author="Andrew Senetar", - author_email="arsenetar@voltaicideas.net", - packages=["send2trash"], - scripts=[], - test_suite="tests", - url="https://github.com/arsenetar/send2trash", - license="BSD License", - description="Send file to trash natively under Mac OS X, Windows and Linux.", - long_description=LONG_DESCRIPTION, - long_description_content_type="text/x-rst", - classifiers=CLASSIFIERS, - extras_require={ - "win32": ['pywin32; sys_platform == "win32"'], - "objc": ['pyobjc-framework-Cocoa; sys_platform == "darwin"'], - "nativeLib": [ - 'pywin32; sys_platform == "win32"', - 'pyobjc-framework-Cocoa; sys_platform == "darwin"', - ], - }, - project_urls={"Bug Reports": "https://github.com/arsenetar/send2trash/issues"}, - entry_points={"console_scripts": ["send2trash=send2trash.__main__:main"]}, -)