Skip to content

Commit

Permalink
pytest&pyproject.toml対応をやめて、setup.pyで実行するように戻し
Browse files Browse the repository at this point in the history
  • Loading branch information
kashewnuts committed Feb 5, 2024
1 parent 8645f64 commit 4d10f17
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 53 deletions.
37 changes: 0 additions & 37 deletions pyproject.toml

This file was deleted.

15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def read_file(filename):

setup(
name='bpnotify',
version='0.48',
version='0.49',
description='Notification routing for Django',
author='BeProud',
author_email='[email protected]',
long_description=read_file('README.rst'),
long_description_content_type="text/x-rst",
url='https://github.com/beproud/bpnotify/',
python_requires='>=3.6',
python_requires='>=3.9',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Plugins',
Expand All @@ -30,21 +30,22 @@ def read_file(filename):
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Framework :: Django',
'Framework :: Django :: 2.2',
'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>=2.2',
'django-jsonfield>=1.0.1',
'Celery>=4.2',
'Django>=3.2',
'Celery>=5.2',
'six',
],
zip_safe=False,
Expand Down
5 changes: 2 additions & 3 deletions test_settings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Django3では、標準のdjango.conf.global_settingsの定数をオーバーライドすると例外が発生する場合がある。
# https://github.com/django/django/blob/70035fb0444ae7c01613374212ca5e3c27c9782c/django/conf/__init__.py#L188
# そのため、testではdjango.conf.global_settingsを直接利用せず、このtest用settings定数を使用する。

import os

SECRET_KEY = "SECRET"
INSTALLED_APPS = (
'django.contrib.auth',
Expand All @@ -24,6 +21,8 @@
}
}

import os

BASE_PATH = os.path.dirname(__file__)

TEMPLATES = [
Expand Down
6 changes: 0 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
envlist = py{39,310,311}-dj{32,42}-celery{52,53},py312-dj42-celery53
skipsdist = True

[pytest]
python_files = tests test_*.py *_tests.py
django_find_project = false
DJANGO_SETTINGS_MODULE = beproud.django.notify.tests.settings

[testenv]
basepython =
py39: python3.9
Expand All @@ -24,7 +19,6 @@ deps =
dj42: Django>=4.2,<5.0
celery52: celery>=5.2,<5.3
celery53: celery>=5.3,<5.4
# commands=pytest {posargs}
commands=python setup.py test

# tox-gh-actionsパッケージの設定
Expand Down

0 comments on commit 4d10f17

Please sign in to comment.