Skip to content

Commit 6ca047c

Browse files
committed
use pyproject.toml and flit_core
1 parent a7715c3 commit 6ca047c

11 files changed

+33
-210
lines changed

.coveragerc

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[run]
22
omit =
33
test_classy/*.py
4-
setup.py
54

65
[report]
76
exclude_lines =

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
- Tasks:
77
* Compatibility with werkzeug 2.2 #145
8+
* Use ``pyproject.toml`` for package metadata and ``flit_core`` as the build backend.
89

910

1011
2021-12-25 Hoat Le <[email protected]>

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test-intg:
1414
test: | test-clean test-intg
1515

1616
report-coverage:
17-
coverage report --omit=test_classful/*,test_classful_py3/*,setup.py
17+
coverage report --omit=test_classful/*,test_classful_py3/*
1818

1919
.DEFAULT_GOAL := resolve
2020

README.rst

-50
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ Install the latest extension with::
5252

5353
$ pip install flask-classful
5454

55-
Or install the bleeding edge development version with::
56-
57-
$ pip install git+https://github.com/pallets-eco/flask-classful.git@develop#egg=flask-classful
58-
5955

6056
Let's see how it works
6157
----------------------
@@ -137,49 +133,3 @@ you ask?
137133
Not at all. Flask-Classful will automatically create routes for any method
138134
in a FlaskView that doesn't begin with an underscore character.
139135
You can still define your own routes of course, and we'll look at that next.
140-
141-
142-
How to develop
143-
--------------
144-
145-
Follow the dev-setup/README.md file (https://github.com/pallets-eco/flask-classful/blob/develop/dev-setup/README.md)
146-
147-
148-
License
149-
-------
150-
151-
BSD License
152-
::
153-
154-
Copyright (c) 2012 by Freedom Dumlao.
155-
156-
Some rights reserved.
157-
158-
Redistribution and use in source and binary forms of the software as well
159-
as documentation, with or without modification, are permitted provided
160-
that the following conditions are met:
161-
162-
* Redistributions of source code must retain the above copyright
163-
notice, this list of conditions and the following disclaimer.
164-
165-
* Redistributions in binary form must reproduce the above
166-
copyright notice, this list of conditions and the following
167-
disclaimer in the documentation and/or other materials provided
168-
with the distribution.
169-
170-
* The names of the contributors may not be used to endorse or
171-
promote products derived from this software without specific
172-
prior written permission.
173-
174-
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
175-
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
176-
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
177-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
178-
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
179-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
180-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
181-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
182-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
183-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
184-
SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
185-
DAMAGE.

docker-compose.yml

-10
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,3 @@ services:
2222
&& make generate"
2323
volumes:
2424
- .:/opt/app
25-
26-
release:
27-
image: python:3.8
28-
working_dir: /opt/app
29-
command: sh run-release.sh
30-
environment:
31-
TWINE_USERNAME: ${TWINE_USERNAME}
32-
TWINE_PASSWORD: ${TWINE_PASSWORD}
33-
volumes:
34-
- .:/opt/app

docs/index.rst

-15
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,9 @@ see: https://github.com/apiguy/flask-classy/issues/80
5151

5252
To switch from ``Flask-Classy`` to ``Flask-Classful``, you just need to update
5353
the module import, as the APIs are the same for both::
54-
// recommended
55-
from flask.ext.flask_classy => from flask_classful
56-
57-
or::
58-
59-
from flask.ext.flask_classy => from flask.ext.flask_classful
60-
61-
Alternatively::
6254

6355
from flask_classy => from flask_classful
6456

65-
You can switch back to ``flask_classy``, if you like, by doing the reverse.
66-
67-
6857
Installation
6958
------------
7059

@@ -73,10 +62,6 @@ Install the latest extension with::
7362
$ pip install flask-classful -U
7463

7564

76-
Or install the bleeding edge development version with::
77-
78-
$ pip install git+https://github.com/pallets-eco/flask-classful.git@develop#egg=flask-classful
79-
8065
Let's see how it works
8166
----------------------
8267

docs/release.rst

-50
This file was deleted.

pyproject.toml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[project]
2+
name = "Flask-Classful"
3+
description = "Class based views for Flask"
4+
readme = "README.rst"
5+
license = { file = "LICENSE" }
6+
maintainers = [{ name = "Pallets Community Ecosystem", email = "[email protected]" }]
7+
classifiers = [
8+
"Development Status :: 4 - Beta",
9+
"Environment :: Web Environment",
10+
"Intended Audience :: Developers",
11+
"License :: OSI Approved :: BSD License",
12+
"Operating System :: OS Independent",
13+
"Programming Language :: Python",
14+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
15+
]
16+
requires-python = ">=3.7"
17+
dependencies = [
18+
"flask>=0.12.5",
19+
]
20+
dynamic = ["version"]
21+
22+
[project.urls]
23+
Source = "https://github.com/pallets-eco/flask-classful/"
24+
25+
[build-system]
26+
requires = ["flit_core<4"]
27+
build-backend = "flit_core.buildapi"
28+
29+
[tool.flit.module]
30+
name = "flask_classful"

run-dev.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu pipefail
55

66
make resolve;
77
pip install $REQUIREMENTS;
8-
python setup.py install;
8+
pip install .;
99

1010
if [ "$CHECK_STYLE" = "yes" ] || [ "$CHECK_STYLE" = "1" ]; then
1111
make check-style;

run-release.sh

-13
This file was deleted.

setup.py

-69
This file was deleted.

0 commit comments

Comments
 (0)