From 7d5dd307eb3e8135a406a55d5d0711eaf4100fde Mon Sep 17 00:00:00 2001 From: Charles Leifer Date: Fri, 10 May 2024 08:39:49 -0500 Subject: [PATCH] Try to work around issue with python 3.12 and pip. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d393fb950..9c23dfd93 100644 --- a/setup.py +++ b/setup.py @@ -145,9 +145,13 @@ def _do_setup(c_extensions, sqlite_extensions): else: ext_modules = None + with open('peewee.py', 'rt') as fh: + version, = [l for l in fh.readlines() if l.startswith('__version__')] + version = re.search(r'\'([\d\.]+)\'', version).groups() + setup( name='peewee', - version=__import__('peewee').__version__, + version=version, description='a little orm', long_description=readme, author='Charles Leifer',