Skip to content

Commit c9bab20

Browse files
committed
[Release] retro: 1.0.0
1 parent e646510 commit c9bab20

File tree

3 files changed

+83
-44
lines changed

3 files changed

+83
-44
lines changed

Makefile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
SHELL := bash
2-
.SHELLFLAGS := -eu -o pipefail -c
3-
MAKEFLAGS += --warn-undefined-variables
4-
MAKEFLAGS += --no-builtin-rules
1+
SHELL:= bash
2+
.SHELLFLAGS:= -eu -o pipefail -c
3+
MAKEFLAGS+= --warn-undefined-variables
4+
MAKEFLAGS+= --no-builtin-rules
5+
PROJECT:=retro
6+
VERSION:=$(shell grep version setup.py | cut -d '"' -f2)
57

68
PYTHON=python
79
PATH_SOURCES_PY=src/py
@@ -100,9 +102,6 @@ check-strict: $(PREP_ALL)
100102
echo "EOS OK $$summary"
101103
fi
102104

103-
104-
105-
106105
.PHONY: lint
107106
lint: check-flakes
108107
@
@@ -111,6 +110,13 @@ lint: check-flakes
111110
format:
112111
@ruff $(SOURCES_PY)
113112

113+
.PHONY: release
114+
release:
115+
@git commit -a -m "[Release] $(PROJECT): $(VERSION)"
116+
git tag $(VERSION)
117+
git push --all
118+
$(PYTHON) setup.py clean sdist register upload
119+
114120
.PHONY: install
115121
install:
116122
@for file in $(SOURCES_BIN); do
@@ -159,5 +165,5 @@ print-%:
159165
$(info $*=$($*))
160166

161167
.ONESHELL:
168+
162169
# EOF
163-
#

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ Highlights:
3232
- Pre/post conditions for request handlers
3333
- HTML templating (plays nice with HTMX)
3434
- CORS support
35+
- Configurable proxy support
3536
- Integrated logging
3637
- Regexp-based tree router
3738

3839
Extra is the successor of [Retro](https://github.com/sebastien/retro),
3940
one of the oldest decorator-based framework for HTTP applications and
40-
built on the 15+ years of experience developing and maintainig that
41+
built on the 15+ years of experience developing and maintaining that
4142
toolkit.
4243

4344
Like Retro, Extra is designed as a kit, providing easily composable

setup.py

Lines changed: 67 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,71 @@
1-
from setuptools import setup
1+
from setuptools import setup, find_packages
22
from mypyc.build import mypycify
3+
import os
4+
5+
6+
def readme():
7+
with open("README.md", "r", encoding="utf-8") as fh:
8+
return fh.read()
9+
10+
11+
def list_ext_modules(base_path="src/py/extra"):
12+
python_files = []
13+
for root, _, files in os.walk(base_path):
14+
for file in files:
15+
if file.endswith(".py"):
16+
python_files.append(os.path.join(root, file))
17+
return python_files
18+
319

4-
# NOTE: This is experimental
520
setup(
6-
name="extra",
7-
packages=[
8-
"extra",
9-
"extra.bridge",
10-
"extra.feature",
11-
"extra.protocol",
12-
"extra.util",
13-
"extra.services",
14-
],
15-
ext_modules=mypycify(
16-
[
17-
"src/py/extra/bridge/awslambda.py",
18-
"src/py/extra/bridge/cli.py",
19-
"src/py/extra/bridge/python.py",
20-
"src/py/extra/bridge/aio.py",
21-
"src/py/extra/bridge/files.py",
22-
"src/py/extra/bridge/__init__.py",
23-
"src/py/extra/bridge/asgi.py",
24-
"src/py/extra/feature/cors.py",
25-
"src/py/extra/feature/channels.py",
26-
"src/py/extra/protocol/__init__.py",
27-
"src/py/extra/protocol/http.py",
28-
"src/py/extra/util/__init__.py",
29-
"src/py/extra/util/files.py",
30-
"src/py/extra/services/__init__.py",
31-
"src/py/extra/services/files.py",
32-
"src/py/extra/__init__.py",
33-
"src/py/extra/routing.py",
34-
"src/py/extra/decorators.py",
35-
"src/py/extra/logging.py",
36-
"src/py/extra/model.py",
37-
]
38-
),
21+
name="extra",
22+
version="1.0.0",
23+
author="Sébastien Pierre",
24+
author_email="sebastien.pierre@gmail.com",
25+
description="A toolkit to write HTTP/1.1 web services and applications, with first class support for streaming",
26+
long_description=readme(),
27+
long_description_content_type="text/markdown",
28+
url="https://github.com/sebastien/extra",
29+
project_urls={
30+
"Bug Tracker": "https://github.com/sebastien/extra/issues",
31+
"Documentation": "https://github.com/sebastien/extra",
32+
"Source Code": "https://github.com/sebastien/extra",
33+
},
34+
packages=find_packages(where="src/py"),
35+
package_dir={"": "src/py"},
36+
classifiers=[
37+
"Development Status :: 4 - Beta",
38+
"Intended Audience :: Developers",
39+
"License :: OSI Approved :: MIT License",
40+
"Operating System :: OS Independent",
41+
"Programming Language :: Python :: 3",
42+
"Programming Language :: Python :: 3.8",
43+
"Programming Language :: Python :: 3.9",
44+
"Programming Language :: Python :: 3.10",
45+
"Programming Language :: Python :: 3.11",
46+
"Programming Language :: Python :: 3.12",
47+
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
48+
"Topic :: Software Development :: Libraries :: Python Modules",
49+
"Topic :: System :: Networking",
50+
],
51+
python_requires=">=3.8",
52+
install_requires=[
53+
"mypy-extensions",
54+
],
55+
extras_require={
56+
"dev": [
57+
"mypy",
58+
"flake8",
59+
"bandit",
60+
],
61+
},
62+
entry_points={
63+
"console_scripts": [
64+
"extra=extra.__main__:main",
65+
],
66+
},
67+
include_package_data=True,
68+
zip_safe=False,
69+
# NOTE: mypyc compilation is experimental
70+
ext_modules=mypycify(list_ext_modules()),
3971
)

0 commit comments

Comments
 (0)