Skip to content

Commit

Permalink
Migrate to declarative build system
Browse files Browse the repository at this point in the history
  • Loading branch information
ushkarev committed Feb 15, 2023
1 parent a3f954f commit 890f766
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 48 deletions.
1 change: 0 additions & 1 deletion moj_irat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
VERSION = (0, 8)
__version__ = '.'.join(map(str, VERSION))
__author__ = 'Ministry of Justice Digital & Technology'
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
47 changes: 47 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
[metadata]
name = django-moj-irat
version = attr: moj_irat.__version__
url = https://github.com/ministryofjustice/django-moj-irat
author = Ministry of Justice Digital & Technology
author_email = dev@digital.justice.gov.uk
description = Tools to support adding a Django-based service to Ministry of Justice’s Incidence Response and Tuning
long_description = file: README.rst
license = MIT
keywords =
django
irat
moj
monitoring
classifiers =
Development Status :: 4 - Beta
Framework :: Django
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Framework :: Django :: 3.1
Framework :: Django :: 3.2
Framework :: Django :: 4.0
Framework :: Django :: 4.1
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11

[options]
; NB: looser python version requirement than what's tested
python_requires = >=3.6
packages =
moj_irat
include_package_data = true
install_requires =
Django>=2.2,<4.3
requests
tests_require =
responses
test_suite = tests.run

[flake8]
exclude = .git/,.eggs/,.tox/,build/,dist/,env/,venv/
max-complexity = 10
Expand Down
49 changes: 2 additions & 47 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,55 +1,10 @@
#!/usr/bin/env python
import importlib
import os
import sys
import warnings

from setuptools import setup

if sys.version_info[0:2] < (3, 8):
warnings.warn('This package is tested with Python version 3.8+', stacklevel=1)
warnings.warn('This package is only tested on Python version 3.8+', stacklevel=1)

root_path = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(root_path, 'README.rst')) as readme:
README = readme.read()

package_info = importlib.import_module('moj_irat')

setup(
name='django-moj-irat',
version=package_info.__version__,
author=package_info.__author__,
author_email='dev@digital.justice.gov.uk',
url='https://github.com/ministryofjustice/django-moj-irat',
packages=['moj_irat'],
include_package_data=True,
license='MIT',
description='Tools to support adding a Django-based service to '
'Ministry of Justice’s Incidence Response and Tuning',
long_description=README,
keywords='moj django irat monitoring',
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
python_requires='>=3.6', # looser requirement than what's tested
install_requires=['Django>=2.2,<4.3', 'requests'],
tests_require=['responses'],
test_suite='tests.run',
)
setup()

0 comments on commit 890f766

Please sign in to comment.