From b21d9aae875e23e36b86a402c1fc6127d1366d9a Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sun, 8 Feb 2026 02:51:20 -0500 Subject: [PATCH 1/3] build: Update some metadata in setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c90278d..0c5d8f8 100644 --- a/setup.py +++ b/setup.py @@ -27,14 +27,14 @@ author = "Tech Squares webapp team", author_email = "squares-webapps@mit.edu", - url = "http://www.mit.edu/~tech-squares/", + url = "https://www.mit.edu/~tech-squares/", description = 'MIT Tech Squares membership app', license = "LICENSE.txt", keywords = ["mit", ], classifiers = [ "Programming Language :: Python", - "Development Status :: 1 - Planning", + "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", ], From 195e4acac1ee3e16075e9b5b4f82b6122975cfbb Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sun, 8 Feb 2026 03:06:46 -0500 Subject: [PATCH 2/3] build: Switch to pyproject.toml I gather this is the more modern approach, plus hopefully it will unbreak Sphinx (which seems to be trying to import `setup.py` and then exploding because `setup.py` thinks it is being run as a script). I suspect this doesn't actually produce a usable package when not installed as editable, but that's probably okay for now. Relevant resources: https://packaging.python.org/en/latest/tutorials/packaging-projects/ https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ https://setuptools.pypa.io/en/latest/userguide/package_discovery.html --- pyproject.toml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 41 ----------------------------------------- 2 files changed, 49 insertions(+), 41 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ef3a832 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,49 @@ +[build-system] +requires = ["setuptools >= 77.0.3"] +build-backend = "setuptools.build_meta" +[project] +name = "squaresdb" +version = "0.1.20260108" +authors = [ + { name="SquaresDB team", email="squares-webapps@mit.edu" }, + { name="Alex Dehnert", email="adehnert@mit.edu" }, +] +description = "MIT Tech Squares membership app" +readme = "README.md" +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Django", + "Operating System :: OS Independent", +] +license = "MIT" +#license-files = ["LICENSE.txt"] + +dependencies = [ + # Server + "django~=5.1", + "django-reversion", + "django-select2", + "pytz", # timezone support TODO: confirm works + "social-auth-core[saml]>=3.0", + "social-auth-app-django", + "django-bootstrap-static>=5,<6" +] + +[project.optional-dependencies] +scripts = ['flup'] # index.fcgi needs flup +mysql = ['mysqlclient'] +dev = [ + 'pylint', 'pylint-django', # lint + 'mypy', 'django-stubs', # type checking +] +doc = ['sphinx>8.2', 'sphinxcontrib-django'] + +[project.urls] +Homepage = "https://github.com/tech-squares/squaresdb" +Issues = "https://github.com/tech-squares/squaresdb/issues" + +[tool.setuptools] +packages = [ "squaresdb" ] diff --git a/setup.py b/setup.py deleted file mode 100644 index 0c5d8f8..0000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -from distutils.core import setup - -setup( - name = "squaresdb", - version = "0.1.20240427", - packages = ["squaresdb"], - install_requires = [ - # Server - "django~=5.1", - "django-reversion", - "django-select2", - "pytz", # timezone support TODO: confirm works - "social-auth-core[saml]>=3.0", - "social-auth-app-django", - "django-bootstrap-static>=5,<6" - ], - - extras_require={ - 'scripts': ['flup'], # index.fcgi needs flup - 'mysql': ['mysqlclient'], - 'dev': [ - 'pylint', 'pylint-django', # lint - 'mypy', 'django-stubs', # type checking - ], - 'doc': ['sphinx>8.2', 'sphinxcontrib-django'], - }, - - author = "Tech Squares webapp team", - author_email = "squares-webapps@mit.edu", - url = "https://www.mit.edu/~tech-squares/", - description = 'MIT Tech Squares membership app', - license = "LICENSE.txt", - - keywords = ["mit", ], - classifiers = [ - "Programming Language :: Python", - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Framework :: Django", - ], -) From aad242b4024b9bfa1c0fb3a273c8dd03cb631e0a Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sun, 8 Feb 2026 22:11:19 -0500 Subject: [PATCH 3/3] django: Upgrade to 5.2 This is an LTS release, so will be supported until at least April 2028. The release notes[1] have no notable changes, and I didn't run into any issues when briefly clicking around. [1] https://docs.djangoproject.com/en/5.2/releases/5.2/ --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ef3a832..7150d51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,9 @@ authors = [ ] description = "MIT Tech Squares membership app" readme = "README.md" -requires-python = ">=3.9" +# Mostly tested on 3.12, but Django 5.2 supports Python 3.10, so *probably* that works +# https://docs.djangoproject.com/en/5.2/releases/5.2/ +requires-python = ">=3.10" classifiers = [ "Programming Language :: Python :: 3", "Development Status :: 5 - Production/Stable", @@ -23,7 +25,7 @@ license = "MIT" dependencies = [ # Server - "django~=5.1", + "django~=5.2", "django-reversion", "django-select2", "pytz", # timezone support TODO: confirm works