Skip to content

Commit

Permalink
removing pystache from hard requirement, it's only used in waf's wscript
Browse files Browse the repository at this point in the history
  • Loading branch information
dozymoe committed Apr 5, 2023
1 parent 9814a36 commit 98e73d9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 81 deletions.
73 changes: 1 addition & 72 deletions etc/pylint.rc
Original file line number Diff line number Diff line change
Expand Up @@ -60,85 +60,14 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
too-many-locals,
duplicate-code,
missing-class-docstring,
Expand Down
5 changes: 3 additions & 2 deletions etc/runner.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"lib.fireh_runner.setup_modules.python",
"lib.fireh_runner.setup_modules.pybuildtool"
],
"python_version": "3.9",
"waf_version": "2.0.23",
"python_version": "3.11",
"waf_version": "2.0.25",
"virtualenv_type": "venv",

"package_name": "PyBuildTool",
"default_project": "pybuildtool",
Expand Down
2 changes: 1 addition & 1 deletion lib/fireh_runner
Submodule fireh_runner updated 1 files
+21 −15 modules/uwsgi.py
7 changes: 6 additions & 1 deletion pybuildtool/tools/mustache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"""
import os
from pystache import render
#-
from pybuildtool import BaseTask

Expand All @@ -24,6 +23,12 @@ def perform(self):
self.bld.fatal("%s can only have one output" %\
tool_name.capitalize())

# pylint:disable=import-outside-toplevel
try:
from chevron import render
except ImportError:
from pystache import render

context = self.conf.get('context', {})
os.makedirs(os.path.dirname(self.file_out[0]), exist_ok=True)
with open(self.file_out[0], 'w', encoding='utf-8') as fout:
Expand Down
4 changes: 2 additions & 2 deletions pybuildtool/wscript.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ else:

def build(bld):
# load main configuration file
import pystache, yaml
import chevron, yaml
from pybuildtool.misc.resource import prepare_targets
from pybuildtool.misc.yaml_utils import OrderedDictYAMLLoader
conf_file = os.path.join(bld.path.abspath(), 'build.yml')
with open(conf_file) as f:
tasks = pystache.render(f.read(), dict(os.environ))
tasks = chevron.render(f.read(), dict(os.environ))
conf = yaml.load(tasks, Loader=OrderedDictYAMLLoader)
# parse data as waf tasks
prepare_targets(conf, bld)
Expand Down
2 changes: 1 addition & 1 deletion requirements-production.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chevron
locket
pystache
pyyaml
stringcase
watchdog
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pybuildtool
version = 2.0.42
version = 2.0.43
description = Build utility to manage web resources.
long_description = file: README.rst
url = https://github.com/dozymoe/PyBuildTool
Expand All @@ -21,7 +21,6 @@ include_package_data = true
packages = find:
install_requires =
locket
pystache
pyyaml
stringcase
watchdog

0 comments on commit 98e73d9

Please sign in to comment.