Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dist): remove setup.cfg #2277

Merged
merged 14 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 13 additions & 34 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
.. raw:: html

<a href="https://falconframework.org" target="_blank">
<img
src="https://raw.githubusercontent.com/falconry/falcon/master/logo/banner.jpg"
alt="Falcon web framework logo"
style="width:100%"
>
</a>
.. image:: https://raw.githubusercontent.com/falconry/falcon/master/logo/banner.jpg
:align: center
:alt: Falcon logo
:target: https://falconframework.org/
:width: 100 %

|Build Status| |Docs| |codecov.io|

Expand Down Expand Up @@ -88,28 +84,7 @@ Falcon tries to do as little as possible while remaining highly effective.
A Big Thank You to Our Patrons!
-------------------------------

.. raw:: html

<p>
<a href="https://www.govcert.lu/" target="_blank"><img src="https://falconframework.org/assets/govcert.png" height="60" alt="CERT Gouvernemental Luxembourg" ></a>
</p>

<p>
<a href="https://www.kontrolnaya-rabota.ru/s/" target="_blank"><img src="https://falconframework.org/assets/rabota.jpg" height="30" alt="Examination RU" style="margin-right: 10px"></a>

<a href="https://www.pnk.sh/python-falcon" target="_blank"><img src="https://falconframework.org/assets/paris.svg" height="30" alt="Paris Kejser" style="margin-right: 10px"></a>

<a href="https://www.algolia.com" target="_blank" style="margin-right: 10px"><img src="https://falconframework.org/assets/algolia.svg" height="30" alt="Algolia"></a>

<a href="https://www.salesforce.com" target="_blank"><img src="https://falconframework.org/assets/salesforce.svg" height="30" alt="Salesforce"></a>
</p>

<p>
<a href="https://www.misaka.io" target="_blank" style="margin-right: 10px"><img src="https://falconframework.org/assets/misaka.svg" height="30" alt="Misaka Network"></a>
<a href="https://github.com/LikaloLLC" target="_blank" style="margin-right: 10px"><img src="https://falconframework.org/assets/likalo.png" height="30" alt="Likalo"></a>
</p>

.. Patron list ends here (see the comment above this section).
|Backer:GovCert|
vytas7 marked this conversation as resolved.
Show resolved Hide resolved

Has Falcon helped you make an awesome app? Show your support today with a one-time donation or by becoming a patron. Supporters get cool gear, an opportunity to promote their brand to Python developers, and
prioritized support.
Expand Down Expand Up @@ -1043,9 +1018,13 @@ See the License for the specific language governing permissions and
limitations under the License.

.. |Docs| image:: https://readthedocs.org/projects/falcon/badge/?version=stable
:target: https://falcon.readthedocs.io/en/stable/?badge=stable
:alt: Falcon web framework docs
:target: https://falcon.readthedocs.io/en/stable/?badge=stable
.. |Build Status| image:: https://github.com/falconry/falcon/workflows/Run%20tests/badge.svg
:target: https://github.com/falconry/falcon/actions?query=workflow%3A%22Run+tests%22
:target: https://github.com/falconry/falcon/actions?query=workflow%3A%22Run+tests%22
.. |codecov.io| image:: https://codecov.io/gh/falconry/falcon/branch/master/graphs/badge.svg
:target: http://codecov.io/gh/falconry/falcon
:target: http://codecov.io/gh/falconry/falcon
.. |Backer:GovCert| image:: https://falconframework.org/assets/govcert.png
:alt: CERT Gouvernemental Luxembourg
:height: 60px
:target: https://www.govcert.lu/
21 changes: 10 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

from datetime import datetime
from collections import OrderedDict
import configparser
from datetime import datetime
import multiprocessing
import sys
import os
import sys

sys.path.insert(0, os.path.abspath('..'))

Expand Down Expand Up @@ -86,19 +85,19 @@
# |version| and |release|, also used in various other places throughout the
# built documents.

cfg = configparser.ConfigParser()
cfg.read('../setup.cfg')
tag = cfg.get('egg_info', 'tag_build')
_version_components = falcon.__version__.split('.')
_prerelease = any(
not component.isdigit() and not component.startswith('post')
for component in _version_components
)

html_context = {
'prerelease': bool(tag), # True if tag is not the empty string
}
html_context = {'prerelease': _prerelease}

# The short X.Y version.
version = '.'.join(falcon.__version__.split('.')[0:2]) + tag
version = '.'.join(_version_components[0:2])

# The full version, including alpha/beta/rc tags.
release = falcon.__version__ + tag
release = falcon.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion falcon/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

"""Falcon version."""

__version__ = '4.0.0'
__version__ = '4.0.0.dev1'
"""Current version of Falcon."""
83 changes: 77 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,81 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
"cython>=3.0.8; python_implementation == 'CPython'", # Skip cython when using pypy
]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
vytas7 marked this conversation as resolved.
Show resolved Hide resolved
"cython>=3.0.8; python_implementation == 'CPython'", # Skip cython when using pypy
]

[project]
name = "falcon"
readme = {file = "README.rst", content-type = "text/x-rst"}
dynamic = ["version"]
dependencies = []
requires-python = ">=3.8"
description = "The ultra-reliable, fast ASGI+WSGI framework for building data plane APIs at scale."
authors = [
{name = "Kurt Griffiths", email = "[email protected]"},
]
license = {text = "Apache 2.0"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Natural Language :: English",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"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",
"Programming Language :: Cython",
]
keywords = [
"asgi",
"wsgi",
"web",
"api",
"framework",
"rest",
"http",
"cloud",
]

[project.scripts]
falcon-bench = "falcon.cmd.bench:main"
falcon-inspect-app = "falcon.cmd.inspect_app:main"
falcon-print-routes = "falcon.cmd.inspect_app:route_main"

[project.urls]
Homepage = "https://falconframework.org"
Documentation = "https://falcon.readthedocs.io/en/stable/"
"Release Notes" = "https://falcon.readthedocs.io/en/stable/changes/"
"Source" = "https://github.com/falconry/falcon"
"Issue Tracker" = "https://github.com/falconry/falcon/issues"
Funding = "https://opencollective.com/falcon"
Chat = "https://gitter.im/falconry/user"

[tool.setuptools]
include-package-data = true
license-files = ["LICENSE"]
zip-safe = false

[tool.setuptools.dynamic]
version = {attr = "falcon.version.__version__"}

[tool.setuptools.packages.find]
exclude = ["examples", "tests"]

[tool.mypy]
exclude = [
Expand Down
80 changes: 0 additions & 80 deletions setup.cfg

This file was deleted.

46 changes: 1 addition & 45 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import glob
import io
import os
from os import path
import platform
import re

from setuptools import setup

Expand Down Expand Up @@ -92,46 +90,4 @@ def list_modules(dirname, pattern):
cmdclass = {}


def load_description():
in_patron_list = False
in_patron_replacement = False
in_raw = False

description_lines = []

# NOTE(kgriffs): PyPI does not support the raw directive
for readme_line in io.open('README.rst', 'r', encoding='utf-8'):
# NOTE(vytas): The patron list largely builds upon raw sections
if readme_line.startswith('.. Patron list starts'):
in_patron_list = True
in_patron_replacement = True
continue
elif in_patron_list:
if not readme_line.strip():
in_patron_replacement = False
elif in_patron_replacement:
description_lines.append(readme_line.lstrip())
if readme_line.startswith('.. Patron list ends'):
in_patron_list = False
continue
elif readme_line.startswith('.. raw::'):
in_raw = True
elif in_raw:
if readme_line and not re.match(r'\s', readme_line):
in_raw = False

if not in_raw:
description_lines.append(readme_line)

return ''.join(description_lines)


def status_msgs(*msgs):
print('*' * 75, *msgs, '*' * 75, sep='\n')


setup(
long_description=load_description(),
cmdclass=cmdclass,
ext_modules=ext_modules,
)
setup(cmdclass=cmdclass, ext_modules=ext_modules)