From: David Lord Date: Wed, 24 Feb 2021 17:50:00 +0000 (-0800) Subject: move version to setup.cfg X-Git-Tag: 3.0.0rc1~32^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1361%2Fhead;p=thirdparty%2Fjinja.git move version to setup.cfg --- diff --git a/setup.cfg b/setup.cfg index bcb2c977..acac7ca8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] name = Jinja2 -# Version needs regex in setup.py. -url = https://palletsprojects.com/p/jinja +version = attr: jinja2.__version__ +url = https://palletsprojects.com/p/jinja/ project_urls = Donate = https://palletsprojects.com/donate Documentation = https://jinja.palletsprojects.com/ diff --git a/setup.py b/setup.py index f6cd2915..00c1f5d1 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,8 @@ -import re - from setuptools import setup -with open("src/jinja2/__init__.py", encoding="utf8") as f: - version = re.search(r'__version__ = "(.*?)"', f.read(), re.M).group(1) - # Metadata goes in setup.cfg. These are here for GitHub's dependency graph. setup( name="Jinja2", - version=version, install_requires=["MarkupSafe>=1.1"], extras_require={"i18n": ["Babel>=2.1"]}, )