aridity 70__tar.gz → 71__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aridity-70 → aridity-71}/PKG-INFO +4 -2
- {aridity-70 → aridity-71}/README.md +1 -0
- {aridity-70 → aridity-71}/aridity/config.py +10 -0
- {aridity-70 → aridity-71}/aridity/model.py +7 -0
- {aridity-70 → aridity-71}/aridity.egg-info/PKG-INFO +4 -2
- aridity-71/setup.py +21 -0
- aridity-70/setup.py +0 -99
- {aridity-70 → aridity-71}/aridity/__init__.py +0 -0
- {aridity-70 → aridity-71}/aridity/arid_config.py +0 -0
- {aridity-70 → aridity-71}/aridity/directives.py +0 -0
- {aridity-70 → aridity-71}/aridity/functions.py +0 -0
- {aridity-70 → aridity-71}/aridity/grammar.py +0 -0
- {aridity-70 → aridity-71}/aridity/keyring.py +0 -0
- {aridity-70 → aridity-71}/aridity/processtemplate.py +0 -0
- {aridity-70 → aridity-71}/aridity/repl.py +0 -0
- {aridity-70 → aridity-71}/aridity/scope.py +0 -0
- {aridity-70 → aridity-71}/aridity/search.py +0 -0
- {aridity-70 → aridity-71}/aridity/stacks.py +0 -0
- {aridity-70 → aridity-71}/aridity/util.py +0 -0
- {aridity-70 → aridity-71}/aridity.egg-info/SOURCES.txt +0 -0
- {aridity-70 → aridity-71}/aridity.egg-info/dependency_links.txt +0 -0
- {aridity-70 → aridity-71}/aridity.egg-info/entry_points.txt +0 -0
- {aridity-70 → aridity-71}/aridity.egg-info/requires.txt +0 -0
- {aridity-70 → aridity-71}/aridity.egg-info/top_level.txt +0 -0
- {aridity-70 → aridity-71}/setup.cfg +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aridity
|
|
3
|
-
Version:
|
|
3
|
+
Version: 71
|
|
4
4
|
Summary: DRY config and template system, easily extensible with Python
|
|
5
|
-
Home-page:
|
|
5
|
+
Home-page: https://pypi.org/project/aridity/
|
|
6
6
|
Author: foyono
|
|
7
|
+
Author-email: shrovis@foyono.com
|
|
7
8
|
License: UNKNOWN
|
|
8
9
|
Platform: UNKNOWN
|
|
9
10
|
Description-Content-Type: text/markdown
|
|
@@ -75,6 +76,7 @@ pip3 install --user aridity
|
|
|
75
76
|
If you prefer to keep .local clean, install to a virtualenv:
|
|
76
77
|
```
|
|
77
78
|
python3 -m venv venvname
|
|
79
|
+
venvname/bin/pip install -U pip
|
|
78
80
|
venvname/bin/pip install aridity
|
|
79
81
|
. venvname/bin/activate
|
|
80
82
|
```
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from .functions import OpaqueKey
|
|
1
2
|
from .model import Entry, Function, Locator, Number, Resource, Scalar, Stream, Text, wrap
|
|
2
3
|
from .repl import Repl
|
|
3
4
|
from .scope import Scope
|
|
@@ -198,6 +199,10 @@ class RConfig(object):
|
|
|
198
199
|
except AttributeError:
|
|
199
200
|
return query.r
|
|
200
201
|
|
|
202
|
+
def __iter__(self):
|
|
203
|
+
for _, o in ctrls[self].scope(True).resolveditems(): # TODO: Investigate how iteration should work.
|
|
204
|
+
yield o.scalar
|
|
205
|
+
|
|
201
206
|
class WConfig(object):
|
|
202
207
|
|
|
203
208
|
def __getattr__(self, name):
|
|
@@ -206,3 +211,8 @@ class WConfig(object):
|
|
|
206
211
|
def __setattr__(self, name, value):
|
|
207
212
|
query = ctrls[self].addname(name)
|
|
208
213
|
query.basescope[tuple(query.prefix)] = wrap(value)
|
|
214
|
+
|
|
215
|
+
def __iadd__(self, value):
|
|
216
|
+
query = ctrls[self].addname(OpaqueKey())
|
|
217
|
+
query.basescope[tuple(query.prefix)] = wrap(value)
|
|
218
|
+
return self
|
|
@@ -427,6 +427,13 @@ class Entry(Struct):
|
|
|
427
427
|
return Concat.unlesssingleton(indent).resolve(None).cat()
|
|
428
428
|
|
|
429
429
|
def wrap(value):
|
|
430
|
+
from .config import ctrls
|
|
431
|
+
try:
|
|
432
|
+
ctrl = ctrls[value]
|
|
433
|
+
except (KeyError, TypeError):
|
|
434
|
+
pass
|
|
435
|
+
else:
|
|
436
|
+
return ctrl.scope(True)
|
|
430
437
|
for b in map(bool, range(2)):
|
|
431
438
|
if value is b:
|
|
432
439
|
return Boolean(value)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aridity
|
|
3
|
-
Version:
|
|
3
|
+
Version: 71
|
|
4
4
|
Summary: DRY config and template system, easily extensible with Python
|
|
5
|
-
Home-page:
|
|
5
|
+
Home-page: https://pypi.org/project/aridity/
|
|
6
6
|
Author: foyono
|
|
7
|
+
Author-email: shrovis@foyono.com
|
|
7
8
|
License: UNKNOWN
|
|
8
9
|
Platform: UNKNOWN
|
|
9
10
|
Description-Content-Type: text/markdown
|
|
@@ -75,6 +76,7 @@ pip3 install --user aridity
|
|
|
75
76
|
If you prefer to keep .local clean, install to a virtualenv:
|
|
76
77
|
```
|
|
77
78
|
python3 -m venv venvname
|
|
79
|
+
venvname/bin/pip install -U pip
|
|
78
80
|
venvname/bin/pip install aridity
|
|
79
81
|
. venvname/bin/activate
|
|
80
82
|
```
|
aridity-71/setup.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from setuptools import find_packages, setup
|
|
2
|
+
|
|
3
|
+
def long_description():
|
|
4
|
+
with open('README.md') as f:
|
|
5
|
+
return f.read()
|
|
6
|
+
|
|
7
|
+
setup(
|
|
8
|
+
name = 'aridity',
|
|
9
|
+
version = '71',
|
|
10
|
+
description = 'DRY config and template system, easily extensible with Python',
|
|
11
|
+
long_description = long_description(),
|
|
12
|
+
long_description_content_type = 'text/markdown',
|
|
13
|
+
url = 'https://pypi.org/project/aridity/',
|
|
14
|
+
author = 'foyono',
|
|
15
|
+
author_email = 'shrovis@foyono.com',
|
|
16
|
+
packages = find_packages(),
|
|
17
|
+
py_modules = [],
|
|
18
|
+
install_requires = ['importlib-metadata>=2.1.3', 'importlib-resources>=3.3.1', 'pyparsing==2.4.7'],
|
|
19
|
+
package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
|
|
20
|
+
entry_points = {'console_scripts': ['aridity=aridity.__init__:main', 'arid-config=aridity.arid_config:main', 'processtemplate=aridity.processtemplate:main']},
|
|
21
|
+
)
|
aridity-70/setup.py
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import setuptools
|
|
2
|
-
|
|
3
|
-
def long_description():
|
|
4
|
-
with open('README.md') as f:
|
|
5
|
-
return f.read()
|
|
6
|
-
|
|
7
|
-
class SourceInfo:
|
|
8
|
-
|
|
9
|
-
class PYXPath:
|
|
10
|
-
|
|
11
|
-
suffixes = '.pyx', '.c'
|
|
12
|
-
|
|
13
|
-
def __init__(self, module, path):
|
|
14
|
-
self.module = module
|
|
15
|
-
self.path = path
|
|
16
|
-
|
|
17
|
-
def buildrequires(self):
|
|
18
|
-
if self.path.endswith('.pyx'):
|
|
19
|
-
yield 'Cython<3'
|
|
20
|
-
|
|
21
|
-
def make_ext(self):
|
|
22
|
-
g = {}
|
|
23
|
-
with open(self.path + 'bld') as f: # Assume project root.
|
|
24
|
-
exec(f.read(), g)
|
|
25
|
-
return g['make_ext'](self.module, self.path)
|
|
26
|
-
|
|
27
|
-
def __init__(self, rootdir):
|
|
28
|
-
import os, setuptools, subprocess
|
|
29
|
-
self.packages = setuptools.find_packages(rootdir)
|
|
30
|
-
extpaths = {}
|
|
31
|
-
def addextpaths(dirpath, moduleprefix):
|
|
32
|
-
names = sorted(os.listdir(os.path.join(rootdir, dirpath)))
|
|
33
|
-
for suffix in self.PYXPath.suffixes:
|
|
34
|
-
for name in names:
|
|
35
|
-
if name.endswith(suffix):
|
|
36
|
-
module = "%s%s" % (moduleprefix, name[:-len(suffix)])
|
|
37
|
-
if module not in extpaths:
|
|
38
|
-
extpaths[module] = self.PYXPath(module, os.path.join(dirpath, name))
|
|
39
|
-
addextpaths('.', '')
|
|
40
|
-
for package in self.packages:
|
|
41
|
-
addextpaths(package.replace('.', os.sep), "%s." % package)
|
|
42
|
-
extpaths = extpaths.values()
|
|
43
|
-
if extpaths and os.path.isdir(os.path.join(rootdir, '.git')): # We could be an unpacked sdist.
|
|
44
|
-
check_ignore = subprocess.Popen(['git', 'check-ignore'] + [p.path for p in extpaths], cwd = rootdir, stdout = subprocess.PIPE)
|
|
45
|
-
ignoredpaths = set(check_ignore.communicate()[0].decode().splitlines())
|
|
46
|
-
assert check_ignore.wait() in [0, 1]
|
|
47
|
-
self.extpaths = [path for path in extpaths if path.path not in ignoredpaths]
|
|
48
|
-
else:
|
|
49
|
-
self.extpaths = extpaths
|
|
50
|
-
|
|
51
|
-
def lazy(clazz, init, *initbefore):
|
|
52
|
-
from threading import Lock
|
|
53
|
-
initlock = Lock()
|
|
54
|
-
init = [init]
|
|
55
|
-
def overridefactory(name):
|
|
56
|
-
orig = getattr(clazz, name)
|
|
57
|
-
def override(*args, **kwargs):
|
|
58
|
-
with initlock:
|
|
59
|
-
if init:
|
|
60
|
-
init[0](obj)
|
|
61
|
-
del init[:]
|
|
62
|
-
return orig(*args, **kwargs)
|
|
63
|
-
return override
|
|
64
|
-
Lazy = type('Lazy', (clazz, object), {name: overridefactory(name) for name in initbefore})
|
|
65
|
-
obj = Lazy()
|
|
66
|
-
return obj
|
|
67
|
-
|
|
68
|
-
# FIXME: The idea was to defer anything Cython/numpy to pyximport time, but this doesn't achieve that.
|
|
69
|
-
def cythonize(extensions):
|
|
70
|
-
def init(ext_modules):
|
|
71
|
-
ordinary = []
|
|
72
|
-
cythonizable = []
|
|
73
|
-
for e in extensions:
|
|
74
|
-
(cythonizable if any(s.endswith('.pyx') for s in e.sources) else ordinary).append(e)
|
|
75
|
-
if cythonizable:
|
|
76
|
-
from Cython.Build import cythonize
|
|
77
|
-
ordinary += cythonize(cythonizable)
|
|
78
|
-
ext_modules[:] = ordinary
|
|
79
|
-
return lazy(list, init, '__getitem__', '__iter__', '__len__')
|
|
80
|
-
|
|
81
|
-
def ext_modules():
|
|
82
|
-
extensions = [path.make_ext() for path in sourceinfo.extpaths]
|
|
83
|
-
return dict(ext_modules = cythonize(extensions)) if extensions else {}
|
|
84
|
-
|
|
85
|
-
sourceinfo = SourceInfo('.')
|
|
86
|
-
setuptools.setup(
|
|
87
|
-
name = 'aridity',
|
|
88
|
-
version = '70',
|
|
89
|
-
description = 'DRY config and template system, easily extensible with Python',
|
|
90
|
-
long_description = long_description(),
|
|
91
|
-
long_description_content_type = 'text/markdown',
|
|
92
|
-
url = None,
|
|
93
|
-
author = 'foyono',
|
|
94
|
-
packages = sourceinfo.packages,
|
|
95
|
-
py_modules = [],
|
|
96
|
-
install_requires = ['importlib-metadata>=2.1.3', 'importlib-resources>=3.3.1', 'pyparsing==2.4.7'],
|
|
97
|
-
package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
|
|
98
|
-
entry_points = {'console_scripts': ['aridity=aridity.__init__:main', 'arid-config=aridity.arid_config:main', 'processtemplate=aridity.processtemplate:main']},
|
|
99
|
-
**ext_modules())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|