installation: moved from setup.py to pyproject.toml:

- updated installation to use the now standard `pyproject.toml` instead of legacy
`setup.py`. `setup.py` and other legacy files have been deleted.
- removed outdated README4PACKAGERS
- removed pylintrc which has not been correctly reviewed. Linter conf should go to
  `pyproject.toml` now.
- [hatch](https://hatch.pypa.io) is now used as main building tool. However, thanks to the
use of standards, other tools can be used too.
- update .hgignore
- several dependencies version bump, with code update to adapt to changes.
This commit is contained in:
Goffi 2023-06-06 16:45:16 +02:00
commit 7c6a675435

View file

@ -61,11 +61,11 @@ except:
)
from lxml import etree
from jinja2 import Markup as safe
from markupsafe import Markup as safe
from jinja2 import is_undefined
from jinja2 import utils
from jinja2 import TemplateNotFound
from jinja2 import contextfilter
from jinja2 import pass_context
from jinja2.loaders import split_template_path
HTML_EXT = ("html", "xhtml")
@ -736,7 +736,7 @@ class Renderer(object):
## custom filters ##
@contextfilter
@pass_context
def _front_url(self, ctx, relative_url):
"""Get front URL (URL seen by end-user) from a relative URL
@ -752,13 +752,13 @@ class Renderer(object):
return os.path.join(site_root_dir, C.TEMPLATE_TPL_DIR, template_data.theme,
relative_url)
@contextfilter
@pass_context
def _next_gidx(self, ctx, value):
"""Use next current global index as suffix"""
next_ = ctx["gidx"].next(value)
return value if next_ == 0 else "{}_{}".format(value, next_)
@contextfilter
@pass_context
def _cur_gidx(self, ctx, value):
"""Use current current global index as suffix"""
current = ctx["gidx"].current(value)
@ -821,7 +821,7 @@ class Renderer(object):
continue
return " ".join(classes) or None
@contextfilter
@pass_context
def _item_filter(self, ctx, item, filters):
"""return item's value, filtered if suitable
@ -847,7 +847,7 @@ class Renderer(object):
kwargs = filters_args[idx] if filters_args is not None else {}
filter_func = self.env.filters[f_name]
try:
eval_context_filter = filter_func.evalcontextfilter
eval_context_filter = filter_func.evalpass_context
except AttributeError:
eval_context_filter = False