foyndation 10__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.
- foyndation-10/PKG-INFO +59 -0
- foyndation-10/README.md +50 -0
- foyndation-10/foyndation/__init__.py +22 -0
- foyndation-10/foyndation.egg-info/PKG-INFO +59 -0
- foyndation-10/foyndation.egg-info/SOURCES.txt +7 -0
- foyndation-10/foyndation.egg-info/dependency_links.txt +1 -0
- foyndation-10/foyndation.egg-info/top_level.txt +1 -0
- foyndation-10/setup.cfg +4 -0
- foyndation-10/setup.py +62 -0
foyndation-10/PKG-INFO
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: foyndation
|
|
3
|
+
Version: 10
|
|
4
|
+
Summary: Base library of foyono projects
|
|
5
|
+
Home-page: https://pypi.org/project/foyndation/
|
|
6
|
+
Author: foyono
|
|
7
|
+
Author-email: shrovis@foyono.com
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# foyndation
|
|
11
|
+
Base library of foyono projects.
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
<a id="foyndation"></a>
|
|
16
|
+
|
|
17
|
+
### foyndation
|
|
18
|
+
|
|
19
|
+
<a id="foyndation.initlogging"></a>
|
|
20
|
+
|
|
21
|
+
###### initlogging
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
def initlogging()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Initialise the logging module to send debug (and higher levels) to stderr.
|
|
28
|
+
|
|
29
|
+
<a id="foyndation.rmsuffix"></a>
|
|
30
|
+
|
|
31
|
+
###### rmsuffix
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
def rmsuffix(text, suffix)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Return text with suffix removed, or `None` if text does not end with suffix.
|
|
38
|
+
|
|
39
|
+
<a id="foyndation.singleton"></a>
|
|
40
|
+
|
|
41
|
+
###### singleton
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
def singleton(t)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The decorated class is replaced with a no-arg instance.
|
|
48
|
+
Can also be used to replace a factory function with its result.
|
|
49
|
+
|
|
50
|
+
<a id="foyndation.solo"></a>
|
|
51
|
+
|
|
52
|
+
###### solo
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
def solo(v)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Assert exactly one object in the given sequence and return it.
|
|
59
|
+
|
foyndation-10/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# foyndation
|
|
2
|
+
Base library of foyono projects.
|
|
3
|
+
|
|
4
|
+
## API
|
|
5
|
+
|
|
6
|
+
<a id="foyndation"></a>
|
|
7
|
+
|
|
8
|
+
### foyndation
|
|
9
|
+
|
|
10
|
+
<a id="foyndation.initlogging"></a>
|
|
11
|
+
|
|
12
|
+
###### initlogging
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
def initlogging()
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Initialise the logging module to send debug (and higher levels) to stderr.
|
|
19
|
+
|
|
20
|
+
<a id="foyndation.rmsuffix"></a>
|
|
21
|
+
|
|
22
|
+
###### rmsuffix
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
def rmsuffix(text, suffix)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Return text with suffix removed, or `None` if text does not end with suffix.
|
|
29
|
+
|
|
30
|
+
<a id="foyndation.singleton"></a>
|
|
31
|
+
|
|
32
|
+
###### singleton
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
def singleton(t)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The decorated class is replaced with a no-arg instance.
|
|
39
|
+
Can also be used to replace a factory function with its result.
|
|
40
|
+
|
|
41
|
+
<a id="foyndation.solo"></a>
|
|
42
|
+
|
|
43
|
+
###### solo
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
def solo(v)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Assert exactly one object in the given sequence and return it.
|
|
50
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
dotpy = '.py'
|
|
4
|
+
|
|
5
|
+
def initlogging():
|
|
6
|
+
'Initialise the logging module to send debug (and higher levels) to stderr.'
|
|
7
|
+
logging.basicConfig(format = "%(asctime)s %(levelname)s %(message)s", level = logging.DEBUG)
|
|
8
|
+
|
|
9
|
+
def rmsuffix(text, suffix):
|
|
10
|
+
'Return text with suffix removed, or `None` if text does not end with suffix.'
|
|
11
|
+
if text.endswith(suffix):
|
|
12
|
+
return text[:-len(suffix)]
|
|
13
|
+
|
|
14
|
+
def singleton(t):
|
|
15
|
+
'''The decorated class is replaced with a no-arg instance.
|
|
16
|
+
Can also be used to replace a factory function with its result.'''
|
|
17
|
+
return t()
|
|
18
|
+
|
|
19
|
+
def solo(v):
|
|
20
|
+
'Assert exactly one object in the given sequence and return it.'
|
|
21
|
+
x, = v
|
|
22
|
+
return x
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: foyndation
|
|
3
|
+
Version: 10
|
|
4
|
+
Summary: Base library of foyono projects
|
|
5
|
+
Home-page: https://pypi.org/project/foyndation/
|
|
6
|
+
Author: foyono
|
|
7
|
+
Author-email: shrovis@foyono.com
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# foyndation
|
|
11
|
+
Base library of foyono projects.
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
<a id="foyndation"></a>
|
|
16
|
+
|
|
17
|
+
### foyndation
|
|
18
|
+
|
|
19
|
+
<a id="foyndation.initlogging"></a>
|
|
20
|
+
|
|
21
|
+
###### initlogging
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
def initlogging()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Initialise the logging module to send debug (and higher levels) to stderr.
|
|
28
|
+
|
|
29
|
+
<a id="foyndation.rmsuffix"></a>
|
|
30
|
+
|
|
31
|
+
###### rmsuffix
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
def rmsuffix(text, suffix)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Return text with suffix removed, or `None` if text does not end with suffix.
|
|
38
|
+
|
|
39
|
+
<a id="foyndation.singleton"></a>
|
|
40
|
+
|
|
41
|
+
###### singleton
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
def singleton(t)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The decorated class is replaced with a no-arg instance.
|
|
48
|
+
Can also be used to replace a factory function with its result.
|
|
49
|
+
|
|
50
|
+
<a id="foyndation.solo"></a>
|
|
51
|
+
|
|
52
|
+
###### solo
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
def solo(v)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Assert exactly one object in the given sequence and return it.
|
|
59
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
foyndation
|
foyndation-10/setup.cfg
ADDED
foyndation-10/setup.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
try:
|
|
3
|
+
from Cython.Build import cythonize
|
|
4
|
+
except ModuleNotFoundError:
|
|
5
|
+
pass
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from setuptools import find_packages
|
|
8
|
+
import os
|
|
9
|
+
|
|
10
|
+
class SourceInfo:
|
|
11
|
+
|
|
12
|
+
class PYXPath:
|
|
13
|
+
|
|
14
|
+
def __init__(self, module, path):
|
|
15
|
+
self.module = module
|
|
16
|
+
self.path = path
|
|
17
|
+
|
|
18
|
+
def make_ext(self):
|
|
19
|
+
g = {}
|
|
20
|
+
with open(f"{self.path}bld") as f: # Assume project root.
|
|
21
|
+
exec(f.read(), g)
|
|
22
|
+
return g['make_ext'](self.module, self.path)
|
|
23
|
+
|
|
24
|
+
def __init__(self, rootdir):
|
|
25
|
+
def addextpaths(dirpath, moduleprefix, suffix = '.pyx'):
|
|
26
|
+
for name in sorted(os.listdir(os.path.join(rootdir, dirpath))):
|
|
27
|
+
if name.endswith(suffix):
|
|
28
|
+
module = f"{moduleprefix}{name[:-len(suffix)]}"
|
|
29
|
+
if module not in extpaths:
|
|
30
|
+
extpaths[module] = self.PYXPath(module, os.path.join(dirpath, name))
|
|
31
|
+
self.packages = find_packages(rootdir)
|
|
32
|
+
extpaths = {}
|
|
33
|
+
addextpaths('.', '')
|
|
34
|
+
for package in self.packages:
|
|
35
|
+
addextpaths(package.replace('.', os.sep), f"{package}.")
|
|
36
|
+
self.extpaths = extpaths.values()
|
|
37
|
+
|
|
38
|
+
def setup_kwargs(self):
|
|
39
|
+
kwargs = dict(packages = self.packages)
|
|
40
|
+
try:
|
|
41
|
+
kwargs['long_description'] = Path('README.md').read_text()
|
|
42
|
+
kwargs['long_description_content_type'] = 'text/markdown'
|
|
43
|
+
except FileNotFoundError:
|
|
44
|
+
pass
|
|
45
|
+
if self.extpaths:
|
|
46
|
+
kwargs['ext_modules'] = cythonize([path.make_ext() for path in self.extpaths])
|
|
47
|
+
return kwargs
|
|
48
|
+
|
|
49
|
+
sourceinfo = SourceInfo('.')
|
|
50
|
+
setup(
|
|
51
|
+
name = 'foyndation',
|
|
52
|
+
version = '10',
|
|
53
|
+
description = 'Base library of foyono projects',
|
|
54
|
+
url = 'https://pypi.org/project/foyndation/',
|
|
55
|
+
author = 'foyono',
|
|
56
|
+
author_email = 'shrovis@foyono.com',
|
|
57
|
+
py_modules = [],
|
|
58
|
+
install_requires = [],
|
|
59
|
+
package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
|
|
60
|
+
entry_points = {'console_scripts': []},
|
|
61
|
+
**sourceinfo.setup_kwargs(),
|
|
62
|
+
)
|