Skip to content

Commit

Permalink
Merge pull request #272 from jsocol/switch-pyproject
Browse files Browse the repository at this point in the history
Switch project config to pyproject.toml
  • Loading branch information
jsocol committed Dec 4, 2022
2 parents c84bf67 + 24022ef commit d19c098
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 48 deletions.
2 changes: 1 addition & 1 deletion django_ratelimit/__init__.py
@@ -1,4 +1,4 @@
VERSION = (3, 0, 1)
VERSION = (4, 0, 0)
__version__ = '.'.join(map(str, VERSION))

ALL = (None,) # Sentinel value for all HTTP methods.
Expand Down
38 changes: 38 additions & 0 deletions pyproject.toml
@@ -0,0 +1,38 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "django-ratelimit"
version = "4.0.0"
authors = [{name = "James Socol", email = "me@jamessocol.com"}]
requires-python = ">= 3.7"
license = {file = "LICENSE"}
description = "Cache-based rate-limiting for Django."
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Topic :: Software Development :: Libraries :: Python Modules",
]
urls = {Homepage = "https://github.com/jsocol/pystatsd"}

[tool.distutils.bdist_wheel]
universal = 1

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages]
find = {namespaces = false}
24 changes: 18 additions & 6 deletions run.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

export PYTHONPATH=".:$PYTHONPATH"
export DJANGO_SETTINGS_MODULE="test_settings"
Expand All @@ -10,20 +10,32 @@ shift
usage() {
echo "USAGE: $PROG [command]"
echo " test - run the ratelimit tests"
echo " flake8 - run flake8"
echo " lint - run flake8 (alias: flake8)"
echo " shell - open the Django shell"
echo " build - build a package for release"
echo " check - run twine check on build artifacts"
exit 1
}

case "$CMD" in
"test" )
echo "Django version: $(python -m django --version)"
python -m django test django_ratelimit "$@";;
"flake8" )
python -m django test django_ratelimit "$@"
;;
"lint"|"flake8" )
echo "Flake8 version: $(flake8 --version)"
flake8 "$@" django_ratelimit/;;
flake8 "$@" django_ratelimit/
;;
"shell" )
python -m django shell ;;
python -m django shell
;;
"build" )
rm -rf dist/*
python -m build
;;
"check" )
twine check dist/*
;;
* )
usage ;;
esac
41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

0 comments on commit d19c098

Please sign in to comment.