Skip to content

Commit 40b7ada

Browse files
authored
Merge pull request django-tenants#1144 from foarsitter/pyproject
Take advantage of pyproject.toml
2 parents dfe47a1 + 700e2f5 commit 40b7ada

7 files changed

Lines changed: 83 additions & 89 deletions

File tree

.github/workflows/code.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ jobs:
2626

2727
- name: Install Python dependencies
2828
run: |
29-
pip install -r requirements.txt
30-
pip install setuptools
3129
# always use latest Django b/c the point here is to test PostgreSQL compatibility
3230
pip install Django
33-
python setup.py develop
31+
pip install -e ".[dev]"
3432
3533
- name: Create database
3634
run: |
@@ -65,10 +63,8 @@ jobs:
6563

6664
- name: Install Python dependencies
6765
run: |
68-
pip install -r requirements.txt
69-
pip install setuptools
7066
pip install Django${{ matrix.django-version }}
71-
python setup.py develop
67+
pip install -e ".[dev]"
7268
7369
- name: Create database
7470
run: |

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ FROM python:3.10
33
RUN mkdir /code
44
VOLUME /code
55
WORKDIR /code
6-
COPY requirements.txt /code/
6+
COPY . /code/
77
RUN apt-get update && apt-get -y install postgresql libpq-dev postgresql-client postgresql-client-common python3-pip git netcat-traditional
8-
RUN pip install --no-cache-dir -r requirements.txt
9-
COPY . /code/
8+
RUN pip install --no-cache-dir -e ".[dev]"

MANIFEST.in

Lines changed: 0 additions & 15 deletions
This file was deleted.

pyproject.toml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
4+
requires = [ "setuptools>=61" ]
5+
6+
[project]
7+
name = "django-tenants"
8+
version = "3.9.0"
9+
description = "Tenant support for Django using PostgreSQL schemas."
10+
readme = "README.rst"
11+
license = "MIT"
12+
authors = [
13+
{ name = "Thomas Turner", email = "tom@twt.me.uk" },
14+
]
15+
requires-python = ">=3.8"
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Environment :: Web Environment",
19+
"Framework :: Django",
20+
"Framework :: Django :: 4.2",
21+
"Framework :: Django :: 5.0",
22+
"Framework :: Django :: 5.1",
23+
"Framework :: Django :: 5.2",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Topic :: Software Development :: Libraries :: Python Modules",
33+
]
34+
dependencies = [
35+
"django>=2.1,<6",
36+
]
37+
38+
optional-dependencies.dev = [
39+
"coverage",
40+
"gunicorn==23",
41+
"psycopg>=3.2.1,<3.3",
42+
]
43+
urls."Homepage" = "https://github.com/django-tenants/django-tenants"
44+
45+
[tool.setuptools]
46+
include-package-data = true
47+
zip-safe = false
48+
49+
[tool.setuptools.packages.find]
50+
include = [
51+
"django_tenants",
52+
"django_tenants.files",
53+
"django_tenants.postgresql_backend",
54+
"django_tenants.management",
55+
"django_tenants.management.commands",
56+
"django_tenants.migration_executors",
57+
"django_tenants.template",
58+
"django_tenants.template.loaders",
59+
"django_tenants.templatetags",
60+
"django_tenants.test",
61+
"django_tenants.tests",
62+
"django_tenants.staticfiles",
63+
"django_tenants.middleware",
64+
"docs",
65+
"examples",
66+
"dts_test_project",
67+
]
68+
69+
[tool.setuptools.package-data]
70+
"django_tenants" = [ "templates/**/*.html" ]
71+
"docs" = [ "**/*" ]
72+
"examples" = [ "**/*" ]
73+
"dts_test_project" = [ "**/*" ]
74+
75+
[tool.setuptools.exclude-package-data]
76+
"*" = [ "*.pyc", "*.pyo" ]
77+
78+
[tool.setuptools.data-files]

requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

run_tests_in_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
python3 setup.py develop
3+
pip install -e .
44

55
echo "docker attach the tty in order to manage this"
66
while true; do

setup.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)