pyven 116__tar.gz → 117__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.
Files changed (38) hide show
  1. {pyven-116 → pyven-117}/PKG-INFO +12 -4
  2. {pyven-116 → pyven-117}/pyven/checks.py +11 -7
  3. {pyven-116 → pyven-117}/pyven/files.py +2 -2
  4. {pyven-116 → pyven-117}/pyven/pipify.py +6 -7
  5. {pyven-116 → pyven-117}/pyven/projectinfo.py +3 -7
  6. {pyven-116 → pyven-117}/pyven/release.py +4 -4
  7. {pyven-116 → pyven-117}/pyven.egg-info/PKG-INFO +12 -4
  8. {pyven-116 → pyven-117}/pyven.egg-info/requires.txt +3 -2
  9. {pyven-116 → pyven-117}/setup.py +2 -2
  10. {pyven-116 → pyven-117}/README.md +0 -0
  11. {pyven-116 → pyven-117}/pyven/Dockerfile.aridt +0 -0
  12. {pyven-116 → pyven-117}/pyven/README.md.aridt +0 -0
  13. {pyven-116 → pyven-117}/pyven/__init__.py +0 -0
  14. {pyven-116 → pyven-117}/pyven/bdist.py +0 -0
  15. {pyven-116 → pyven-117}/pyven/container.py +0 -0
  16. {pyven-116 → pyven-117}/pyven/execcheck.py +0 -0
  17. {pyven-116 → pyven-117}/pyven/functions.py +0 -0
  18. {pyven-116 → pyven-117}/pyven/licheck.py +0 -0
  19. {pyven-116 → pyven-117}/pyven/mainmodules.py +0 -0
  20. {pyven-116 → pyven-117}/pyven/metacheck.py +0 -0
  21. {pyven-116 → pyven-117}/pyven/minreqs.py +0 -0
  22. {pyven-116 → pyven-117}/pyven/nlcheck.py +0 -0
  23. {pyven-116 → pyven-117}/pyven/patchpolicy.py +0 -0
  24. {pyven-116 → pyven-117}/pyven/projectinfo.arid +0 -0
  25. {pyven-116 → pyven-117}/pyven/pyproject.toml.aridt +0 -0
  26. {pyven-116 → pyven-117}/pyven/release.arid +0 -0
  27. {pyven-116 → pyven-117}/pyven/setup.py.aridt +0 -0
  28. {pyven-116 → pyven-117}/pyven/setuptools.arid +0 -0
  29. {pyven-116 → pyven-117}/pyven/sourceinfo.py +0 -0
  30. {pyven-116 → pyven-117}/pyven/tasks.py +0 -0
  31. {pyven-116 → pyven-117}/pyven/tests/__init__.py +0 -0
  32. {pyven-116 → pyven-117}/pyven/tryinstall.py +0 -0
  33. {pyven-116 → pyven-117}/pyven/util.py +0 -0
  34. {pyven-116 → pyven-117}/pyven.egg-info/SOURCES.txt +0 -0
  35. {pyven-116 → pyven-117}/pyven.egg-info/dependency_links.txt +0 -0
  36. {pyven-116 → pyven-117}/pyven.egg-info/entry_points.txt +0 -0
  37. {pyven-116 → pyven-117}/pyven.egg-info/top_level.txt +0 -0
  38. {pyven-116 → pyven-117}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pyven
3
- Version: 116
3
+ Version: 117
4
4
  Summary: Manage development of multiple Python projects
5
5
  Home-page: https://pypi.org/project/pyven/
6
6
  Author: Homsar
@@ -8,13 +8,21 @@ Author-email: homsar@foyono.com
8
8
  Description-Content-Type: text/markdown
9
9
  Requires-Dist: aridity>=85
10
10
  Requires-Dist: diapyr>=31
11
- Requires-Dist: foyndation>=10
12
- Requires-Dist: lagoon>=49
11
+ Requires-Dist: foyndation>=16
12
+ Requires-Dist: lagoon>=63
13
+ Requires-Dist: packaging>=25
13
14
  Requires-Dist: pydoc-markdown>=3.3
14
15
  Requires-Dist: roman>=5
15
16
  Requires-Dist: setuptools>=44.1.1
16
17
  Requires-Dist: twine>=1.15.0
17
18
  Requires-Dist: venvpool>=18
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: requires-dist
25
+ Dynamic: summary
18
26
 
19
27
  # pyven
20
28
  Manage development of multiple Python projects.
@@ -13,6 +13,7 @@ from itertools import chain
13
13
  from lagoon.text import diff, pydoc_markdown, tidy
14
14
  from lagoon.url import URL
15
15
  from pathlib import Path
16
+ from pstats import SortKey, Stats
16
17
  from setuptools import find_packages
17
18
  from shutil import copy2, copytree, ignore_patterns
18
19
  from subprocess import DEVNULL
@@ -93,7 +94,7 @@ class EveryVersion:
93
94
  venv.run('check_call', [], 'pyflakes', paths)
94
95
  _runcheck(3, pyflakes)
95
96
 
96
- basenoseargs = '--capture-output', '--exe', '-v', '--with-doctest', '--doctest-extension', '.mediawiki', '--with-cov', '--cov-report', 'term-missing', '--with-xunit'
97
+ basenoseargs = '--capture-output', '--exe', '-v', '--with-doctest', '--doctest-extension', '.mediawiki', '--with-cov', '--cov-report', 'term-missing', '--with-xunit', '--with-cprofile', '--cprofile-stats-erase'
97
98
 
98
99
  def _spokeurl(self):
99
100
  try:
@@ -109,7 +110,7 @@ class EveryVersion:
109
110
  with doctestpath.open('w') as f:
110
111
  if url is not None:
111
112
  try:
112
- result = tidy._asxml(check = False, input = url.w(f"Category:Doctest/{self.info.config.name}"), stderr = DEVNULL)
113
+ result = tidy._asxml[::DEVNULL](check = False, input = url.w(f"Category:Doctest/{self.info.config.name}"))
113
114
  except HTTPError as e:
114
115
  if e.code != HTTPStatus.NOT_FOUND:
115
116
  raise
@@ -121,10 +122,11 @@ class EveryVersion:
121
122
  upstream_devel_packages = list(self.info.config.upstream.devel.packages)
122
123
  upstream_devel_scripts = list(self.info.config.upstream.devel.scripts) if self.userepo else []
123
124
  # TODO: Facility to freeze test requirements graph.
124
- with InstallDeps(self.info, ('nose-cov', 'pynose', *self.info.config.test.requires), self.siblings, _localrepo(), self.userepo) as installdeps:
125
+ with InstallDeps(self.info, ('nose-cprof', 'nose-cov', 'pynose', *self.info.config.test.requires), self.siblings, _localrepo(), self.userepo) as installdeps:
125
126
  reportsdir = self.info.projectdir / 'var' / '3'
126
127
  reportsdir.mkdir(exist_ok = True, parents = True)
127
128
  xmlpath = reportsdir / 'nosetests.xml'
129
+ statspath = reportsdir / 'stats.dat'
128
130
  testpaths = self.files.testpaths([doctestpath], xmlpath)
129
131
  if self.docker:
130
132
  coveragepath = self.info.projectdir / '.coverage'
@@ -133,19 +135,21 @@ class EveryVersion:
133
135
  container.installasuser(installdeps.containerrequires())
134
136
  cpath = lambda p: os.path.relpath(p, self.info.projectdir).replace(os.sep, '/')
135
137
  status = container.inworkdir.nosetests[print](
136
- *self.basenoseargs, '--xunit-file', cpath(xmlpath),
137
- *sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []), *map(cpath, testpaths), *self.noseargs,
138
+ *self.basenoseargs, '--xunit-file', cpath(xmlpath), '--cprofile-stats-file', cpath(statspath),
139
+ *chain.from_iterable(['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), *map(cpath, testpaths), *self.noseargs,
138
140
  check = False)
139
141
  else:
140
142
  coveragepath = Path('.coverage')
141
143
  with Pool().readonlyortransient[self.transient](installdeps) as venv:
142
144
  status = venv.run('call', installdeps.localreqs, 'nose', [
143
- *self.basenoseargs, '--xunit-file', xmlpath,
144
- *sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []), *map(str, testpaths), *self.noseargs,
145
+ *self.basenoseargs, '--xunit-file', xmlpath, '--cprofile-stats-file', statspath,
146
+ *chain.from_iterable(['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), *map(str, testpaths), *self.noseargs,
145
147
  ])
146
148
  if coveragepath.exists():
147
149
  copy2(coveragepath, reportsdir / 'coverage') # Replace whatever the status, as if we configured the location.
148
150
  coveragepath.unlink() # Can't simply use rename cross-device in release case.
151
+ if not status:
152
+ Stats(str(statspath)).sort_stats(SortKey.CUMULATIVE).print_stats(50)
149
153
  assert not status
150
154
 
151
155
  def readme(self):
@@ -1,5 +1,5 @@
1
1
  from collections import defaultdict
2
- from foyndation import dotpy
2
+ from foyndation import dotpy, inf
3
3
  from lagoon.program import partial
4
4
  from lagoon.text import git
5
5
  from pathlib import Path
@@ -49,5 +49,5 @@ class Files:
49
49
  if name in nametopath:
50
50
  pathtotime[nametopath[name]] += float(e.getAttribute('time'))
51
51
  break
52
- paths.sort(key = lambda p: pathtotime.get(p, float('inf')))
52
+ paths.sort(key = lambda p: pathtotime.get(p, inf))
53
53
  return paths
@@ -5,18 +5,18 @@ from aridity.config import ConfigCtrl
5
5
  from diapyr.util import bfs
6
6
  from email.parser import Parser
7
7
  from foyndation import initlogging, solo
8
+ from importlib.resources import as_file, files
8
9
  from itertools import chain
9
10
  from lagoon.program import Program
10
11
  from lagoon.text import git
11
12
  from pathlib import Path
12
- from pkg_resources import resource_filename
13
13
  from shutil import copytree, rmtree
14
14
  from tempfile import mkdtemp
15
15
  from venvpool import Pool
16
16
  import logging, os
17
17
 
18
18
  log = logging.getLogger(__name__)
19
- setuptoolsreq = 'setuptools>=69.3,<75.8'
19
+ setuptoolsreq = 'setuptools>=75.8.1,<77'
20
20
 
21
21
  def pipify(info, version):
22
22
  # Allow release of project without origin:
@@ -58,11 +58,10 @@ console_scripts := $list()
58
58
  cc.w.build_requires += name
59
59
  if proc.donekeys != {'setuptools', 'wheel'}:
60
60
  tasks.append(['pyproject.toml', 'pyproject.toml.aridt', 'tomlquote'])
61
- for name, template, quote in tasks:
62
- cc.execute(f'" = $({quote})')
63
- cc.processtemplate(
64
- resource_filename(__name__, template), # TODO LATER: Make aridity get the resource.
65
- os.path.abspath(info.projectdir / name))
61
+ with as_file(files(__spec__.parent)) as parent:
62
+ for name, template, quote in tasks:
63
+ cc.execute(f'" = $({quote})')
64
+ cc.processtemplate(parent / template, (info.projectdir / name).absolute()) # TODO LATER: Make aridity get the resource.
66
65
 
67
66
  def main():
68
67
  initlogging()
@@ -8,7 +8,7 @@ from importlib.resources import files
8
8
  from inspect import getsource
9
9
  from lagoon.program import Program
10
10
  from lagoon.text import git
11
- from pkg_resources import parse_requirements
11
+ from packaging.requirements import Requirement
12
12
  from roman import fromRoman, toRoman
13
13
  from setuphacks import getsetupkwargs
14
14
  from urllib.error import HTTPError
@@ -29,7 +29,7 @@ class Req:
29
29
 
30
30
  @classmethod
31
31
  def parselines(cls, lines):
32
- return [cls(parsed) for parsed in parse_requirements(lines)]
32
+ return [cls(Requirement(l)) for l in lines]
33
33
 
34
34
  @property
35
35
  def namepart(self):
@@ -51,7 +51,7 @@ class Req:
51
51
  self.parsed = parsed
52
52
 
53
53
  def acceptversion(self, versionstr):
54
- return versionstr in self.parsed
54
+ return versionstr in self.parsed.specifier
55
55
 
56
56
  def siblingpath(self, workspace):
57
57
  return workspace / self.namepart
@@ -75,10 +75,6 @@ class Req:
75
75
  if 'UndefinedEnvironmentName' != type(e).__name__:
76
76
  raise
77
77
 
78
- def keyversion(self):
79
- s, = self.specifierset
80
- return self.parsed.key, s.version
81
-
82
78
  class SimpleInstallDeps(ParsedRequires):
83
79
 
84
80
  parselines = staticmethod(Req.parselines)
@@ -7,11 +7,11 @@ from .sourceinfo import SourceInfo
7
7
  from argparse import ArgumentParser
8
8
  from aridity.config import ConfigCtrl
9
9
  from foyndation import dotpy, initlogging, singleton, solo
10
+ from importlib.resources import as_file, files
10
11
  from itertools import chain
11
12
  from lagoon.binary import tidy
12
13
  from lagoon.program import NOEOL, partial, Program
13
14
  from lagoon.text import docker, git
14
- from pkg_resources import resource_filename
15
15
  from shutil import copy2, copytree, rmtree
16
16
  from tempfile import NamedTemporaryFile, TemporaryDirectory
17
17
  from urllib.error import HTTPError
@@ -61,7 +61,7 @@ class Image:
61
61
  scripts = list(info.config.devel.scripts)
62
62
  packages = list(info.config.devel.packages)
63
63
  # TODO: Copy not mount so we can run containers in parallel.
64
- with bgcontainer('-v', f"{info.projectdir}:/io", f"{self.prefix}{self.plat}:{self.imagetag}") as container:
64
+ with bgcontainer('-v', f"{info.projectdir}:/io", f"{self.prefix}{self.plat}:{self.imagetag}") as container, as_file(files(__spec__.parent)) as parent:
65
65
  def run(execargs, command):
66
66
  docker.exec[print](*execargs, container.cid, *self.arch.entrypoint, *command)
67
67
  if packages:
@@ -71,9 +71,9 @@ class Image:
71
71
  dirpath = docker.exec[NOEOL](container.cid, 'mktemp', '-d') # No need to cleanup, will die with container.
72
72
  log.debug("In container dir %s run script: %s", dirpath, script)
73
73
  run(['-w', dirpath, '-t'], ['sh', '-c', script])
74
- docker.cp[print](resource_filename(__name__, 'patchpolicy.py'), f"{container.cid}:/patchpolicy.py")
74
+ docker.cp[print](parent / 'patchpolicy.py', f"{container.cid}:/patchpolicy.py")
75
75
  run([], [self.pythonexe, '/patchpolicy.py'])
76
- docker.cp[print](resource_filename(__name__, 'bdist.py'), f"{container.cid}:/bdist.py")
76
+ docker.cp[print](parent / 'bdist.py', f"{container.cid}:/bdist.py")
77
77
  run(['-u', f"{os.geteuid()}:{os.getegid()}", '-w', '/io'], [self.pythonexe, '/bdist.py', '--plat', self.plat])
78
78
 
79
79
  def _uploadableartifacts(artifactrelpaths):
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pyven
3
- Version: 116
3
+ Version: 117
4
4
  Summary: Manage development of multiple Python projects
5
5
  Home-page: https://pypi.org/project/pyven/
6
6
  Author: Homsar
@@ -8,13 +8,21 @@ Author-email: homsar@foyono.com
8
8
  Description-Content-Type: text/markdown
9
9
  Requires-Dist: aridity>=85
10
10
  Requires-Dist: diapyr>=31
11
- Requires-Dist: foyndation>=10
12
- Requires-Dist: lagoon>=49
11
+ Requires-Dist: foyndation>=16
12
+ Requires-Dist: lagoon>=63
13
+ Requires-Dist: packaging>=25
13
14
  Requires-Dist: pydoc-markdown>=3.3
14
15
  Requires-Dist: roman>=5
15
16
  Requires-Dist: setuptools>=44.1.1
16
17
  Requires-Dist: twine>=1.15.0
17
18
  Requires-Dist: venvpool>=18
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: requires-dist
25
+ Dynamic: summary
18
26
 
19
27
  # pyven
20
28
  Manage development of multiple Python projects.
@@ -1,7 +1,8 @@
1
1
  aridity>=85
2
2
  diapyr>=31
3
- foyndation>=10
4
- lagoon>=49
3
+ foyndation>=16
4
+ lagoon>=63
5
+ packaging>=25
5
6
  pydoc-markdown>=3.3
6
7
  roman>=5
7
8
  setuptools>=44.1.1
@@ -49,13 +49,13 @@ class SourceInfo:
49
49
  sourceinfo = SourceInfo('.')
50
50
  setup(
51
51
  name = 'pyven',
52
- version = '116',
52
+ version = '117',
53
53
  description = 'Manage development of multiple Python projects',
54
54
  url = 'https://pypi.org/project/pyven/',
55
55
  author = 'Homsar',
56
56
  author_email = 'homsar@foyono.com',
57
57
  py_modules = [],
58
- install_requires = ['aridity>=85', 'diapyr>=31', 'foyndation>=10', 'lagoon>=49', 'pydoc-markdown>=3.3', 'roman>=5', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=18'],
58
+ install_requires = ['aridity>=85', 'diapyr>=31', 'foyndation>=16', 'lagoon>=63', 'packaging>=25', 'pydoc-markdown>=3.3', 'roman>=5', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=18'],
59
59
  package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
60
60
  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']},
61
61
  **sourceinfo.setup_kwargs(),
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