pyven 100__tar.gz → 101__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.
- {pyven-100 → pyven-101}/PKG-INFO +1 -7
- {pyven-100 → pyven-101}/README.md +0 -6
- {pyven-100 → pyven-101}/pyven/files.py +10 -19
- {pyven-100 → pyven-101}/pyven/projectinfo.py +11 -6
- {pyven-100 → pyven-101}/pyven/util.py +1 -25
- {pyven-100 → pyven-101}/pyven.egg-info/PKG-INFO +1 -7
- {pyven-100 → pyven-101}/pyven.egg-info/SOURCES.txt +0 -2
- {pyven-100 → pyven-101}/pyven.egg-info/entry_points.txt +0 -2
- {pyven-100 → pyven-101}/setup.py +2 -2
- pyven-100/pyven/drmake.py +0 -11
- pyven-100/pyven/launch.py +0 -23
- {pyven-100 → pyven-101}/pyven/README.md.aridt +0 -0
- {pyven-100 → pyven-101}/pyven/__init__.py +0 -0
- {pyven-100 → pyven-101}/pyven/bdist.py +0 -0
- {pyven-100 → pyven-101}/pyven/checks.py +0 -0
- {pyven-100 → pyven-101}/pyven/divcheck.py +0 -0
- {pyven-100 → pyven-101}/pyven/execcheck.py +0 -0
- {pyven-100 → pyven-101}/pyven/functions.py +0 -0
- {pyven-100 → pyven-101}/pyven/licheck.py +0 -0
- {pyven-100 → pyven-101}/pyven/mainmodules.py +0 -0
- {pyven-100 → pyven-101}/pyven/minreqs.py +0 -0
- {pyven-100 → pyven-101}/pyven/nlcheck.py +0 -0
- {pyven-100 → pyven-101}/pyven/patchpolicy.py +0 -0
- {pyven-100 → pyven-101}/pyven/pipify.py +0 -0
- {pyven-100 → pyven-101}/pyven/projectinfo.arid +0 -0
- {pyven-100 → pyven-101}/pyven/pyproject.toml.aridt +0 -0
- {pyven-100 → pyven-101}/pyven/release.arid +0 -0
- {pyven-100 → pyven-101}/pyven/release.py +0 -0
- {pyven-100 → pyven-101}/pyven/setup.cfg.aridt +0 -0
- {pyven-100 → pyven-101}/pyven/setup.py.aridt +0 -0
- {pyven-100 → pyven-101}/pyven/setuptools.arid +0 -0
- {pyven-100 → pyven-101}/pyven/sourceinfo.py +0 -0
- {pyven-100 → pyven-101}/pyven/tasks.py +0 -0
- {pyven-100 → pyven-101}/pyven/tests/__init__.py +0 -0
- {pyven-100 → pyven-101}/pyven/tryinstall.py +0 -0
- {pyven-100 → pyven-101}/pyven.egg-info/dependency_links.txt +0 -0
- {pyven-100 → pyven-101}/pyven.egg-info/requires.txt +0 -0
- {pyven-100 → pyven-101}/pyven.egg-info/top_level.txt +0 -0
- {pyven-100 → pyven-101}/setup.cfg +0 -0
{pyven-100 → pyven-101}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyven
|
|
3
|
-
Version:
|
|
3
|
+
Version: 101
|
|
4
4
|
Summary: Manage development of multiple Python projects
|
|
5
5
|
Home-page: https://pypi.org/project/pyven/
|
|
6
6
|
Author: Homsar
|
|
@@ -19,12 +19,6 @@ Manage development of multiple Python projects
|
|
|
19
19
|
|
|
20
20
|
## Commands
|
|
21
21
|
|
|
22
|
-
### drmake
|
|
23
|
-
Build a Docker image with automatic tag.
|
|
24
|
-
|
|
25
|
-
### launch
|
|
26
|
-
Run project using a suitable venv from the pool.
|
|
27
|
-
|
|
28
22
|
### minreqs
|
|
29
23
|
Pin requires to their minimum allowed versions.
|
|
30
24
|
|
|
@@ -3,12 +3,6 @@ Manage development of multiple Python projects
|
|
|
3
3
|
|
|
4
4
|
## Commands
|
|
5
5
|
|
|
6
|
-
### drmake
|
|
7
|
-
Build a Docker image with automatic tag.
|
|
8
|
-
|
|
9
|
-
### launch
|
|
10
|
-
Run project using a suitable venv from the pool.
|
|
11
|
-
|
|
12
6
|
### minreqs
|
|
13
7
|
Pin requires to their minimum allowed versions.
|
|
14
8
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from .util import stripeol
|
|
2
1
|
from collections import defaultdict
|
|
3
2
|
import os, subprocess, xml.dom.minidom as dom
|
|
4
3
|
|
|
@@ -23,24 +22,16 @@ class Files:
|
|
|
23
22
|
@classmethod
|
|
24
23
|
def relpaths(cls, root, suffixes, prefixes):
|
|
25
24
|
paths = list(cls._findfiles(root, suffixes, prefixes))
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if
|
|
35
|
-
|
|
36
|
-
paths = [p for p in paths if not p.startswith(submoduleslash)]
|
|
37
|
-
if paths:
|
|
38
|
-
p = subprocess.Popen(['git', 'check-ignore'] + paths, stdout = subprocess.PIPE, cwd = root)
|
|
39
|
-
ignored = set(p.communicate()[0].decode().splitlines())
|
|
40
|
-
assert p.wait() in [0, 1]
|
|
41
|
-
for path in paths:
|
|
42
|
-
if path not in ignored:
|
|
43
|
-
yield path
|
|
25
|
+
if os.path.exists(os.path.join(root, '.gitmodules')):
|
|
26
|
+
for submoduleslash in (l.split(' ', 1)[1] + os.sep for l in subprocess.check_output(['git', 'config', '--file', '.gitmodules', '--get-regexp', '^submodule[.].+[.]path$'], cwd = root).decode().splitlines()):
|
|
27
|
+
paths = [p for p in paths if not p.startswith(submoduleslash)]
|
|
28
|
+
if paths:
|
|
29
|
+
p = subprocess.Popen(['git', 'check-ignore'] + paths, stdout = subprocess.PIPE, cwd = root)
|
|
30
|
+
ignored = set(p.communicate()[0].decode().splitlines())
|
|
31
|
+
assert p.wait() in [0, 1]
|
|
32
|
+
for path in paths:
|
|
33
|
+
if path not in ignored:
|
|
34
|
+
yield path
|
|
44
35
|
|
|
45
36
|
def __init__(self, root):
|
|
46
37
|
srcsuffixes = sum(([s, "%s.aridt" % s] for s in ['.py', '.py3', '.pyx', '.s', '.sh', '.h', '.cpp', '.cxx', '.arid', '.gradle', '.java', '.mk', '.md']), [])
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from . import mainmodules
|
|
2
2
|
from .files import Files
|
|
3
|
-
from .util import
|
|
3
|
+
from .util import Seek
|
|
4
4
|
from aridity.config import ConfigCtrl
|
|
5
5
|
from aridity.model import Entry, Resource
|
|
6
6
|
from aridity.util import openresource
|
|
7
7
|
from inspect import getsource
|
|
8
|
+
from pathlib import Path
|
|
8
9
|
from pkg_resources import parse_requirements
|
|
9
10
|
from setuphacks import getsetupkwargs
|
|
10
11
|
from venvpool import ParsedRequires, TemporaryDirectory
|
|
@@ -106,7 +107,7 @@ class ProjectInfo:
|
|
|
106
107
|
|
|
107
108
|
@classmethod
|
|
108
109
|
def seek(cls, realdir):
|
|
109
|
-
path =
|
|
110
|
+
path = Seek.seek(realdir, cls.projectaridname)
|
|
110
111
|
if path is None:
|
|
111
112
|
raise ProjectInfoNotFoundException(realdir)
|
|
112
113
|
return cls(path.parent, path)
|
|
@@ -117,15 +118,19 @@ class ProjectInfo:
|
|
|
117
118
|
return cls.seek(realdir)
|
|
118
119
|
except ProjectInfoNotFoundException:
|
|
119
120
|
pass
|
|
120
|
-
setuppath =
|
|
121
|
+
setuppath = Seek.seek(realdir, 'setup.py')
|
|
121
122
|
if setuppath is not None:
|
|
122
123
|
log.info('Use setuptools mode.')
|
|
123
|
-
return
|
|
124
|
+
return _setuptoolsinfo(setuppath)
|
|
124
125
|
log.info('Use uninstallable mode.')
|
|
125
|
-
projectdir = os.path.dirname(
|
|
126
|
+
projectdir = os.path.dirname(Seek.seek(realdir, '.git'))
|
|
126
127
|
with openresource(__name__, 'setuptools.arid') as f:
|
|
127
128
|
info = cls(projectdir, f)
|
|
128
129
|
info.config.name = os.path.basename(os.path.abspath(projectdir))
|
|
130
|
+
try:
|
|
131
|
+
info.allrequires.extend((Path(projectdir) / 'requirements.txt').read_text().splitlines())
|
|
132
|
+
except FileNotFoundError:
|
|
133
|
+
pass
|
|
129
134
|
return info
|
|
130
135
|
|
|
131
136
|
def __init__(self, projectdir, infopathorstream):
|
|
@@ -203,7 +208,7 @@ class MainModule:
|
|
|
203
208
|
for k, v in d.items():
|
|
204
209
|
setattr(self, k, v)
|
|
205
210
|
|
|
206
|
-
def
|
|
211
|
+
def _setuptoolsinfo(setuppath):
|
|
207
212
|
with openresource(__name__, 'setuptools.arid') as f:
|
|
208
213
|
info = ProjectInfo(os.path.dirname(setuppath), f)
|
|
209
214
|
setupkwargs = getsetupkwargs(setuppath, ['name', 'install_requires', 'entry_points'])
|
|
@@ -7,10 +7,6 @@ def stderr(obj):
|
|
|
7
7
|
sys.stderr.write(str(obj))
|
|
8
8
|
sys.stderr.write(os.linesep)
|
|
9
9
|
|
|
10
|
-
def stripeol(line):
|
|
11
|
-
line, = line.splitlines()
|
|
12
|
-
return line
|
|
13
|
-
|
|
14
10
|
class Excludes:
|
|
15
11
|
|
|
16
12
|
def __init__(self, globs):
|
|
@@ -33,7 +29,7 @@ class Excludes:
|
|
|
33
29
|
def __contains__(self, relpath):
|
|
34
30
|
return self.pattern.search(relpath) is not None
|
|
35
31
|
|
|
36
|
-
class
|
|
32
|
+
class Seek(str):
|
|
37
33
|
|
|
38
34
|
@classmethod
|
|
39
35
|
def seek(cls, dirpath, name):
|
|
@@ -47,26 +43,6 @@ class Path(str):
|
|
|
47
43
|
break
|
|
48
44
|
dirpath = parent
|
|
49
45
|
|
|
50
|
-
class ThreadPoolExecutor:
|
|
51
|
-
|
|
52
|
-
def __enter__(self):
|
|
53
|
-
return self
|
|
54
|
-
|
|
55
|
-
def submit(self, f, *args, **kwargs):
|
|
56
|
-
class Task:
|
|
57
|
-
def result(self):
|
|
58
|
-
return f(*args, **kwargs)
|
|
59
|
-
return Task()
|
|
60
|
-
|
|
61
|
-
def __exit__(self, *exc_info):
|
|
62
|
-
pass
|
|
63
|
-
|
|
64
|
-
assert ThreadPoolExecutor
|
|
65
|
-
try:
|
|
66
|
-
from concurrent.futures import ThreadPoolExecutor
|
|
67
|
-
except ImportError:
|
|
68
|
-
pass
|
|
69
|
-
|
|
70
46
|
@contextmanager
|
|
71
47
|
def bgcontainer(*dockerrunargs):
|
|
72
48
|
from lagoon import docker
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyven
|
|
3
|
-
Version:
|
|
3
|
+
Version: 101
|
|
4
4
|
Summary: Manage development of multiple Python projects
|
|
5
5
|
Home-page: https://pypi.org/project/pyven/
|
|
6
6
|
Author: Homsar
|
|
@@ -19,12 +19,6 @@ Manage development of multiple Python projects
|
|
|
19
19
|
|
|
20
20
|
## Commands
|
|
21
21
|
|
|
22
|
-
### drmake
|
|
23
|
-
Build a Docker image with automatic tag.
|
|
24
|
-
|
|
25
|
-
### launch
|
|
26
|
-
Run project using a suitable venv from the pool.
|
|
27
|
-
|
|
28
22
|
### minreqs
|
|
29
23
|
Pin requires to their minimum allowed versions.
|
|
30
24
|
|
{pyven-100 → pyven-101}/setup.py
RENAMED
|
@@ -44,7 +44,7 @@ class SourceInfo:
|
|
|
44
44
|
sourceinfo = SourceInfo('.')
|
|
45
45
|
setup(
|
|
46
46
|
name = 'pyven',
|
|
47
|
-
version = '
|
|
47
|
+
version = '101',
|
|
48
48
|
description = 'Manage development of multiple Python projects',
|
|
49
49
|
long_description = long_description(),
|
|
50
50
|
long_description_content_type = 'text/markdown',
|
|
@@ -54,6 +54,6 @@ setup(
|
|
|
54
54
|
py_modules = [],
|
|
55
55
|
install_requires = ['aridity>=77', 'diapyr>=31', 'lagoon>=24', 'pydoc-markdown>=3.3', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=14'],
|
|
56
56
|
package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
|
|
57
|
-
entry_points = {'console_scripts': ['
|
|
57
|
+
entry_points = {'console_scripts': ['minreqs=pyven.minreqs:main', 'pipify=pyven.pipify:main', 'release=pyven.release:main', 'tasks=pyven.tasks:main', 'tryinstall=pyven.tryinstall:main', 'tests=pyven.tests.__init__:main']},
|
|
58
58
|
**sourceinfo.setup_kwargs(),
|
|
59
59
|
)
|
pyven-100/pyven/drmake.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'Build a Docker image with automatic tag.'
|
|
2
|
-
from .projectinfo import ProjectInfo
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
def main():
|
|
6
|
-
info = ProjectInfo.seek('.')
|
|
7
|
-
command = 'docker', 'build', '-t', info.config.docker.tag, info.projectdir
|
|
8
|
-
os.execvp(command[0], command)
|
|
9
|
-
|
|
10
|
-
if '__main__' == __name__:
|
|
11
|
-
main()
|
pyven-100/pyven/launch.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'Run project using a suitable venv from the pool.'
|
|
2
|
-
from .pipify import InstallDeps
|
|
3
|
-
from .projectinfo import ProjectInfo
|
|
4
|
-
from argparse import ArgumentParser
|
|
5
|
-
from venvpool import initlogging, Pool
|
|
6
|
-
import subprocess, sys
|
|
7
|
-
|
|
8
|
-
def main(): # TODO: Retire in favour of venvpool module.
|
|
9
|
-
initlogging()
|
|
10
|
-
parser = ArgumentParser()
|
|
11
|
-
parser.add_argument('--build', action = 'store_true', help = 'rebuild native components')
|
|
12
|
-
args = parser.parse_args()
|
|
13
|
-
info = ProjectInfo.seekany('.')
|
|
14
|
-
_, objref = next(iter(info.console_scripts())).split('=') # XXX: Support more than just the first?
|
|
15
|
-
modulename, qname = objref.split(':')
|
|
16
|
-
with InstallDeps(info, False, None) as installdeps, Pool(sys.version_info.major).readonlyorreadwrite[args.build](installdeps) as venv:
|
|
17
|
-
if args.build:
|
|
18
|
-
venv.install(['--no-deps', '-e', info.projectdir]) # XXX: Can this be done without venv install?
|
|
19
|
-
status = subprocess.call([venv.programpath('python'), '-c', "from %s import %s; %s()" % (modulename, qname.split('.')[0], qname)])
|
|
20
|
-
sys.exit(status)
|
|
21
|
-
|
|
22
|
-
if '__main__' == __name__:
|
|
23
|
-
main()
|
|
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
|
|
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
|