Revert setup.py portion of "version-in-one-place"

Defining the version string in a single place is a nice goal to have,
but since we are currently straddling the fence as it relates to
setuptools and pyproject.toml, mingling them together results in some
unexpected behavior and is thus not advisable. We can revisit this if
and when we make a full switch away from setuptools.
This commit is contained in:
Justin Mayer 2019-07-14 16:55:32 +02:00
commit a52c67d42c

View file

@ -1,5 +1,4 @@
#!/usr/bin/env python
import re
import sys
from io import open
from os import walk
@ -8,21 +7,7 @@ from os.path import join, relpath
from setuptools import setup
def get_version():
VERSION_REGEX = re.compile(
r"^version\s*=\s*\"(?P<version>.*)\"$"
)
with open("pyproject.toml") as f:
for line in f:
match = VERSION_REGEX.match(line)
if match:
return match.group("version")
return None
version = get_version()
version = "4.0.1"
requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments', 'docutils',
'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4',