Skip to content

Commit

Permalink
setup.py -> pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
millerdev committed Jan 2, 2025
1 parent b7cdbec commit aad0547
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 68 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ jobs:
- name: Setup
run: |
python --version
pip install --upgrade pip wheel
pip install "${{ matrix.django }}" psycopg2-binary pytest-unmagic flake8
pip install --upgrade pip
pip install "${{ matrix.django }}"
pip install -e .[test]
- name: Run tests
env:
DB_SETTINGS: >-
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ to use Common Table Expressions with the Django ORM.
cd django-cte
python -m venv .venv
source .venv/bin/activate
pip install django pytest-unmagic flake8
pip install -e .[test]
pytest
flake8 --config=setup.cfg
# To run tests against postgres
pip install psycopg2-binary
psql -U username -h localhost -p 5432 -c 'create database django_cte;'
export PG_DB_SETTINGS='{
"ENGINE":"django.db.backends.postgresql_psycopg2",
Expand Down
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[project]
name = "django-cte"
description = "Common Table Expressions (CTE) for Django"
authors = [{name = "Daniel Miller", email = "[email protected]"}]
license = {file = "LICENSE"}
readme = {file = "README.md", content-type = "text/markdown"}
dynamic = ["version"]
requires-python = ">= 3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Framework :: Django',
'Framework :: Django :: 4',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Topic :: Software Development :: Libraries :: Python Modules',
]
dependencies = ["django"]

[project.optional-dependencies]
test = [
"flake8",
"psycopg2-binary",
"pytest-unmagic",
]

[project.urls]
Home = "https://github.com/dimagi/django-cte"

[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.module]
name = "django_cte"

[tool.distutils.bdist_wheel]
universal = true

[tool.flake8]
exclude = "./build"
8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

56 changes: 0 additions & 56 deletions setup.py

This file was deleted.

0 comments on commit aad0547

Please sign in to comment.