Skip to content

Commit 41f5f8d

Browse files
committed
Switch to pyproject.toml
1 parent 47ee07d commit 41f5f8d

File tree

4 files changed

+71
-104
lines changed

4 files changed

+71
-104
lines changed

pyproject.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "TurboGears2"
7+
version = "2.5.0a0"
8+
description = "Next generation TurboGears"
9+
readme = { file = "README.rst", content-type = "text/x-rst" }
10+
requires-python = ">=3.8"
11+
keywords = ["python", "web", "framework", "wsgi", "full-stack", "mvc", "mongodb", "sqlalchemy"]
12+
classifiers = [
13+
"Intended Audience :: Developers",
14+
"Environment :: Web Environment",
15+
"Programming Language :: Python",
16+
"Programming Language :: Python :: 3.8",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Topic :: Internet :: WWW/HTTP",
23+
"Topic :: Internet :: WWW/HTTP :: WSGI",
24+
]
25+
authors = [
26+
{ name = "Alessandro Molina", email = "[email protected]" },
27+
{ name = "Mark Ramm" },
28+
{ name = "Christopher Perkins" },
29+
{ name = "Jonathan LaCour" },
30+
{ name = "Rick Copland" },
31+
{ name = "Alberto Valverde" },
32+
{ name = "Michael Pedersen" }
33+
]
34+
license = { text = "MIT" }
35+
urls = { Homepage = "http://www.turbogears.org/" }
36+
dependencies = [
37+
"WebOb>=1.8.9,<1.10.0",
38+
"crank>=0.8.0,<0.9.0",
39+
"repoze.lru",
40+
"MarkupSafe"
41+
]
42+
43+
[project.optional-dependencies]
44+
testing = [
45+
"pytest",
46+
"zope.sqlalchemy>=0.4",
47+
"repoze.who",
48+
"repoze.who.plugins.sa>=1.0.1",
49+
"Genshi>=0.5.1",
50+
"Mako",
51+
"WebTest",
52+
"backlash>=0.3.0",
53+
"raven",
54+
"Beaker",
55+
"sqlalchemy",
56+
"jinja2",
57+
"ming>=0.8.0",
58+
"Kajiki>=0.4.4",
59+
"formencode>=1.3.0a1"
60+
]
61+
62+
[tool.setuptools.packages.find]
63+
exclude = ["ez_setup", "examples", "tests", "tests.*"]
64+
65+
[tool.setuptools]
66+
include-package-data = true
67+
zip-safe = false

setup.py

Lines changed: 3 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,5 @@
1-
import os
2-
here = os.path.abspath(os.path.dirname(__file__))
3-
exec(compile(open(os.path.join(here, 'tg', 'release.py')).read(), 'release.py', 'exec'), globals(), locals())
1+
from setuptools import setup
42

5-
from setuptools import find_packages, setup
63

7-
import sys
8-
py_version = sys.version_info[:2]
9-
10-
if py_version < (3, 8):
11-
raise RuntimeError('TurboGears2 requires Python 3.8 or better')
12-
13-
test_requirements = ['pytest',
14-
'zope.sqlalchemy >= 0.4',
15-
'repoze.who',
16-
'repoze.who.plugins.sa >= 1.0.1',
17-
'Genshi >= 0.5.1',
18-
'Mako',
19-
'WebTest',
20-
'backlash >= 0.3.0',
21-
'raven',
22-
'Beaker',
23-
'sqlalchemy',
24-
'jinja2',
25-
'typing;python_version<"3.5"',
26-
'ming >= 0.8.0',
27-
'Kajiki >= 0.4.4',
28-
'formencode>=1.3.0a1',]
29-
30-
31-
install_requires=[
32-
'WebOb >= 1.8.0, < 1.10.0',
33-
'crank >= 0.8.0, < 0.9.0',
34-
'repoze.lru',
35-
'MarkupSafe'
36-
]
37-
38-
setup(
39-
name='TurboGears2',
40-
version=version,
41-
description=description,
42-
long_description=long_description,
43-
classifiers=[
44-
'Intended Audience :: Developers',
45-
'Environment :: Web Environment',
46-
'Programming Language :: Python',
47-
'Programming Language :: Python :: 3.7',
48-
'Programming Language :: Python :: 3.8',
49-
'Programming Language :: Python :: 3.9',
50-
'Programming Language :: Python :: 3.10',
51-
'Programming Language :: Python :: 3.11',
52-
'Programming Language :: Python :: 3.12',
53-
'Programming Language :: Python :: 3.13',
54-
'Topic :: Internet :: WWW/HTTP',
55-
'Topic :: Internet :: WWW/HTTP :: WSGI',
56-
],
57-
keywords='turbogears',
58-
author=author,
59-
author_email=email,
60-
url=url,
61-
license=license,
62-
packages=find_packages(exclude=('ez_setup', 'examples', 'tests', 'tests.*')),
63-
include_package_data=True,
64-
zip_safe=False,
65-
install_requires=install_requires,
66-
extras_require={
67-
'testing':test_requirements,
68-
},
69-
entry_points='''
70-
'''
71-
)
4+
if __name__ == "__main__":
5+
setup()

tg/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
FullStackApplicationConfigurator)
5656
from tg.wsgiapp import TGApp
5757
from tg.controllers import TGController, RestController, redirect, url, lurl, abort
58-
from tg.release import version
5958
from tg.decorators import (validate, expose, override_template, use_custom_format,
6059
require, with_engine, cached, decode_params)
6160

@@ -68,10 +67,7 @@
6867

6968
from tg.request_local import Request, Response
7069

71-
__version__ = version
72-
73-
__all__ = ['__version__',
74-
'app_globals', 'expose', 'override_template', 'request',
70+
__all__ = ['app_globals', 'expose', 'override_template', 'request',
7571
'require', 'response', 'session', 'TGApp', 'TGController', 'tmpl_context',
7672
'use_wsgi_app', 'validate', 'i18n', 'json_encode', 'cache', 'url', 'lurl',
7773
'dispatched_controller', 'use_custom_format', 'with_engine', 'render_template',

tg/release.py

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

0 commit comments

Comments
 (0)