diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e784c4..c58fb63 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ common: &common - checkout - restore_cache: keys: - - v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} + - v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }} - v2-deps- - run: name: install dependencies @@ -28,7 +28,7 @@ common: &common - ~/.cache/pip - ~/.local - ./eggs - key: v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} + key: v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }} jobs: lint: diff --git a/AUTHORS b/AUTHORS index f3212b9..c73e8d1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,3 +14,4 @@ Mike Franklin Graham Ullrich Katherine Michel Timothy Hobbs +David Vadnais diff --git a/Makefile b/Makefile index fdeebeb..65ee563 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: init test init: - python setup.py develop + pip install -e . pip install tox coverage test: diff --git a/pinax/teams/__init__.py b/pinax/teams/__init__.py index be7a2b8..b7cace2 100644 --- a/pinax/teams/__init__.py +++ b/pinax/teams/__init__.py @@ -1,5 +1,8 @@ -import pkg_resources +from importlib.metadata import PackageNotFoundError, version -__version__ = pkg_resources.get_distribution("pinax-teams").version +try: + __version__ = version("pinax-teams") +except PackageNotFoundError: + __version__ = "unknown" default_app_config = "pinax.teams.apps.AppConfig" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ccbc7d5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,52 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "pinax-teams" +version = "3.0.1" +description = "An app for Django sites that supports open, by invitation, and by application teams" +readme = {file = "README.md", content-type = "text/markdown"} +license = {text = "MIT"} +authors = [ + {name = "Pinax Team", email = "team@pinaxproject.com"}, +] +requires-python = ">=3.8" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Django", + "Framework :: Django :: 3.0", + "Framework :: Django :: 4.0", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "django>=3.2", + "django-reversion>=5.0.4", + "pinax-invitations>=8.0.1", + "python-slugify>=7.0.0", + "Pillow>=9.3.0", + "django-user-accounts>=3.2.0", +] + +[project.optional-dependencies] +tests = [ + "django-test-plus>=1.0.22", + "pinax-templates>=3.0.1", +] + +[project.urls] +Homepage = "http://github.com/pinax/pinax-teams/" + +[tool.setuptools.packages.find] +where = ["."] + +[tool.setuptools] +zip-safe = false diff --git a/setup.py b/setup.py deleted file mode 100644 index 9bdbd71..0000000 --- a/setup.py +++ /dev/null @@ -1,94 +0,0 @@ -from setuptools import find_packages, setup - -VERSION = "3.0.0" -LONG_DESCRIPTION = r""" -.. image:: http://pinaxproject.com/pinax-design/patches/pinax-teams.svg - :target: https://pypi.python.org/pypi/pinax-teams/ - -=========== -Pinax Teams -=========== - -.. image:: https://img.shields.io/pypi/v/pinax-teams.svg - :target: https://pypi.python.org/pypi/pinax-teams/ - -\ - -.. image:: https://img.shields.io/circleci/project/github/pinax/pinax-teams.svg - :target: https://circleci.com/gh/pinax/pinax-teams -.. image:: https://img.shields.io/codecov/c/github/pinax/pinax-teams.svg - :target: https://codecov.io/gh/pinax/pinax-teams -.. image:: https://img.shields.io/github/contributors/pinax/pinax-teams.svg - :target: https://github.com/pinax/pinax-teams/graphs/contributors -.. image:: https://img.shields.io/github/issues-pr/pinax/pinax-teams.svg - :target: https://github.com/pinax/pinax-teams/pulls -.. image:: https://img.shields.io/github/issues-pr-closed/pinax/pinax-teams.svg - :target: https://github.com/pinax/pinax-teams/pulls?q=is%3Apr+is%3Aclosed - -\ - -.. image:: http://slack.pinaxproject.com/badge.svg - :target: http://slack.pinaxproject.com/ -.. image:: https://img.shields.io/badge/license-MIT-blue.svg - :target: https://pypi.python.org/pypi/pinax-teams/ - -\ - -``pinax-teams`` is an app for Django sites that supports open, by invitation, and by application teams. - -Supported Django and Python Versions ------------------------------------- - -+-----------------+-----+-----+-----+-----+ -| Django / Python | 3.7 | 3.8 | 3.9 | 3.10| -+=================+=====+=====+=====+=====+ -| 3.2 | * | * | * | * | -+-----------------+-----+-----+-----+-----+ -| 4.1 | - | - | - | * | -+-----------------+-----+-----+-----+-----+ -""" - -setup( - author="Pinax Team", - author_email="team@pinaxproject.com", - description="An app for Django sites that supports open, by invitation, and by application teams", - name="pinax-teams", - long_description=LONG_DESCRIPTION, - version=VERSION, - url="http://github.com/pinax/pinax-teams/", - license="MIT", - packages=find_packages(), - package_data={ - "teams": [] - }, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Framework :: Django", - "Framework :: Django :: 3.0", - "Framework :: Django :: 4.0", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - install_requires=[ - "django>=3.2", - "django-reversion>=5.0.4", - "pinax-invitations>=8.0.0", - "python-slugify>=7.0.0", - "Pillow>=9.3.0", - "django-user-accounts>=3.2.0" - ], - tests_require=[ - "django-test-plus>=1.0.22", - "pinax-templates>=3.0.0", - ], - test_suite="runtests.runtests", - zip_safe=False -) diff --git a/tox.ini b/tox.ini index 277aead..d425056 100644 --- a/tox.ini +++ b/tox.ini @@ -37,9 +37,10 @@ deps = dj: Django>=3.2,<5.0 master: https://github.com/django/django/tarball/master +extras = tests usedevelop = True commands = - coverage run setup.py test + coverage run runtests.py coverage report -m --skip-covered [testenv:checkqa]