Loosen required Jinja version

This commit is contained in:
László Károlyi 2024-08-30 14:21:07 +02:00
parent bd0af24cc9
commit adaccf678a
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE
3 changed files with 23 additions and 4 deletions

View file

@ -12,4 +12,4 @@ build-backend = 'setuptools.build_meta'
[tool.setuptools.dynamic]
# dependencies = { file = ['requirements.txt'] }
version = { attr = 'ktools.VERSION' }
version = { attr = 'ktools.__version__' }

View file

@ -1,10 +1,29 @@
from codecs import open as codecs_open
from os.path import abspath, dirname, join
from pathlib import Path
from setuptools import setup
def read(rel_path):
here = abspath(dirname(__file__))
with codecs_open(join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
print('XXX', get_version(rel_path='src/ktools/__init__.py'))
setup(
name='py-ktools',
version='1.0.1',
version=get_version(rel_path='src/ktools/__init__.py'),
# packages=['ktools'],
install_requires=[
],
@ -14,7 +33,7 @@ setup(
'typing_extensions~=4.4',
'Unidecode~=1.3.6',
'rjsmin~=1.2.1',
'Jinja2==3.1.2',
'Jinja2~=3.1.2',
]
},
author='László Károlyi',

View file

@ -1 +1 @@
VERSION = '1.0.4'
__version__ = '1.0.5'