From 13f9dfef2d203c09d552ea57a592d6eaefb4e15a Mon Sep 17 00:00:00 2001 From: kashewnuts Date: Fri, 2 Feb 2024 15:36:53 +0900 Subject: [PATCH] migrate from setup.py to pyproject.toml --- beproud/__init__.py | 7 ----- beproud/django/__init__.py | 7 ----- pyproject.toml | 37 +++++++++++++++++++++++++++ setup.py | 52 -------------------------------------- 4 files changed, 37 insertions(+), 66 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/beproud/__init__.py b/beproud/__init__.py index 1a79358..e69de29 100644 --- a/beproud/__init__.py +++ b/beproud/__init__.py @@ -1,7 +0,0 @@ -# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - from pkgutil import extend_path - __path__ = locals()['__path__'] # make PyFlakes happy - __path__ = extend_path(__path__, __name__) diff --git a/beproud/django/__init__.py b/beproud/django/__init__.py index 1a79358..e69de29 100644 --- a/beproud/django/__init__.py +++ b/beproud/django/__init__.py @@ -1,7 +0,0 @@ -# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - from pkgutil import extend_path - __path__ = locals()['__path__'] # make PyFlakes happy - __path__ = extend_path(__path__, __name__) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b9e443a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "bpnotify" +version = "0.48" +authors = [ + { name="BeProud Inc.", email="project@beproud.jp" }, +] +description = "Notification routing for Django" +readme = "README.rst" +requires-python = ">=3.9" +keywords=["django"] +classifiers = [ + "Development Status :: 3 - Alpha", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Framework :: Django", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.2", + "Intended Audience :: Developers", + "Environment :: Plugins", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = ["Django>=3.2", "six", "Celery"] + +[project.urls] +Homepage = "https://github.com/beproud/bpnotify/" + +[tool.setuptools.packages.find] +where = ["."] diff --git a/setup.py b/setup.py deleted file mode 100644 index 02a4dc4..0000000 --- a/setup.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python -#:coding=utf-8: - -import os -from setuptools import setup, find_packages - -def read_file(filename): - basepath = os.path.dirname(__file__) - filepath = os.path.join(basepath, filename) - with open(filepath) as f: - read_text = f.read() - return read_text - - -setup( - name='bpnotify', - version='0.48', - description='Notification routing for Django', - author='BeProud', - author_email='project@beproud.jp', - long_description=read_file('README.rst'), - long_description_content_type="text/x-rst", - url='https://github.com/beproud/bpnotify/', - python_requires='>=3.9', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Environment :: Plugins', - 'Framework :: Django', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.2', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - include_package_data=True, - packages=find_packages(), - namespace_packages=['beproud', 'beproud.django'], - test_suite='tests.main', - install_requires=[ - 'Django~=3.2', - 'Celery~=5.2', - 'six', - ], - zip_safe=False, -)