pyven 103__tar.gz → 104__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 (37) hide show
  1. {pyven-103 → pyven-104}/PKG-INFO +1 -1
  2. {pyven-103 → pyven-104}/pyven/checks.py +12 -12
  3. {pyven-103 → pyven-104}/pyven/files.py +12 -21
  4. {pyven-103 → pyven-104}/pyven/licheck.py +9 -9
  5. {pyven-103 → pyven-104}/pyven/minreqs.py +2 -3
  6. {pyven-103 → pyven-104}/pyven/nlcheck.py +1 -1
  7. {pyven-103 → pyven-104}/pyven/pipify.py +7 -6
  8. {pyven-103 → pyven-104}/pyven/projectinfo.py +13 -14
  9. {pyven-103 → pyven-104}/pyven/release.py +4 -7
  10. {pyven-103 → pyven-104}/pyven/util.py +10 -6
  11. {pyven-103 → pyven-104}/pyven.egg-info/PKG-INFO +1 -1
  12. {pyven-103 → pyven-104}/setup.py +1 -1
  13. {pyven-103 → pyven-104}/README.md +0 -0
  14. {pyven-103 → pyven-104}/pyven/README.md.aridt +0 -0
  15. {pyven-103 → pyven-104}/pyven/__init__.py +0 -0
  16. {pyven-103 → pyven-104}/pyven/bdist.py +0 -0
  17. {pyven-103 → pyven-104}/pyven/divcheck.py +0 -0
  18. {pyven-103 → pyven-104}/pyven/execcheck.py +0 -0
  19. {pyven-103 → pyven-104}/pyven/functions.py +0 -0
  20. {pyven-103 → pyven-104}/pyven/mainmodules.py +0 -0
  21. {pyven-103 → pyven-104}/pyven/patchpolicy.py +0 -0
  22. {pyven-103 → pyven-104}/pyven/projectinfo.arid +0 -0
  23. {pyven-103 → pyven-104}/pyven/pyproject.toml.aridt +0 -0
  24. {pyven-103 → pyven-104}/pyven/release.arid +0 -0
  25. {pyven-103 → pyven-104}/pyven/setup.cfg.aridt +0 -0
  26. {pyven-103 → pyven-104}/pyven/setup.py.aridt +0 -0
  27. {pyven-103 → pyven-104}/pyven/setuptools.arid +0 -0
  28. {pyven-103 → pyven-104}/pyven/sourceinfo.py +0 -0
  29. {pyven-103 → pyven-104}/pyven/tasks.py +0 -0
  30. {pyven-103 → pyven-104}/pyven/tests/__init__.py +0 -0
  31. {pyven-103 → pyven-104}/pyven/tryinstall.py +0 -0
  32. {pyven-103 → pyven-104}/pyven.egg-info/SOURCES.txt +0 -0
  33. {pyven-103 → pyven-104}/pyven.egg-info/dependency_links.txt +0 -0
  34. {pyven-103 → pyven-104}/pyven.egg-info/entry_points.txt +0 -0
  35. {pyven-103 → pyven-104}/pyven.egg-info/requires.txt +0 -0
  36. {pyven-103 → pyven-104}/pyven.egg-info/top_level.txt +0 -0
  37. {pyven-103 → pyven-104}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 103
3
+ Version: 104
4
4
  Summary: Manage development of multiple Python projects
5
5
  Home-page: https://pypi.org/project/pyven/
6
6
  Author: Homsar
@@ -77,7 +77,7 @@ class EveryVersion:
77
77
  expected = ''.join(f"{r}\n" for r in self.info.allrequires)
78
78
  if not expected:
79
79
  expected = '# This file blank.\n'
80
- assert expected == Path(self.info.projectdir, 'requirements.txt').read_text()
80
+ assert expected == (self.info.projectdir / 'requirements.txt').read_text()
81
81
  _runcheck('*', reqscheck)
82
82
 
83
83
  def divcheck(self):
@@ -91,7 +91,7 @@ class EveryVersion:
91
91
  _runcheck(pyversion, divcheck)
92
92
 
93
93
  def pyflakes(self):
94
- paths = [path for excludes in [Excludes(self.info.config.flakes.exclude.globs)]
94
+ paths = [str(path) for excludes in [Excludes(self.info.config.flakes.exclude.globs)]
95
95
  for path in self.files.pypaths if os.path.relpath(path, self.files.root) not in excludes]
96
96
  def pyflakes():
97
97
  if paths:
@@ -106,11 +106,11 @@ class EveryVersion:
106
106
  with InstallDeps(self.info, self.siblings, _localrepo() if self.userepo else None) as installdeps:
107
107
  installdeps.add('nose-cov', *self.info.config.test.requires) # TODO: Facility to freeze test requires tree.
108
108
  for pyversion in self.info.config.pyversions:
109
- reportsdir = os.path.join(self.info.projectdir, 'var', str(pyversion))
110
- os.makedirs(reportsdir, exist_ok = True)
111
- xmlpath = os.path.join(reportsdir, 'nosetests.xml')
109
+ reportsdir = self.info.projectdir / 'var' / str(pyversion)
110
+ reportsdir.mkdir(exist_ok = True, parents = True)
111
+ xmlpath = reportsdir / 'nosetests.xml'
112
112
  if self.docker:
113
- coveragepath = os.path.join(self.info.projectdir, '.coverage')
113
+ coveragepath = self.info.projectdir / '.coverage'
114
114
  with bgcontainer('-v', "{0}:{0}".format('/var/run/docker.sock'), '--network', 'host', '-v', f"{os.path.abspath(self.info.projectdir)}:{Container.workdir}", f"python:{pyversiontags[pyversion][0]}") as container:
115
115
  container = Container(container)
116
116
  container.cp(installdeps.workspace, 'installdeps')
@@ -132,7 +132,7 @@ class EveryVersion:
132
132
  '--with-cov', '--cov-report', 'term-missing',
133
133
  ] + sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []) + [cpath(p) for p in self.files.testpaths(xmlpath)] + self.noseargs)
134
134
  else:
135
- coveragepath = '.coverage'
135
+ coveragepath = Path('.coverage')
136
136
  with Pool(pyversion).readonlyortransient[self.transient](installdeps) as venv:
137
137
  status = venv.run('call', installdeps.localreqs, Task('''import collections
138
138
  try:
@@ -144,10 +144,10 @@ except AttributeError:
144
144
  '--with-doctest', '--doctest-extension', '.md',
145
145
  '--with-xunit', '--xunit-file', xmlpath,
146
146
  '--with-cov', '--cov-report', 'term-missing',
147
- ] + sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []) + self.files.testpaths(xmlpath) + self.noseargs)
148
- if os.path.exists(coveragepath):
149
- copy2(coveragepath, os.path.join(reportsdir, 'coverage')) # Replace whatever the status, as if we configured the location.
150
- os.remove(coveragepath) # Can't simply use rename cross-device in release case.
147
+ ] + sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []) + [str(p) for p in self.files.testpaths(xmlpath)] + self.noseargs)
148
+ if coveragepath.exists():
149
+ copy2(coveragepath, reportsdir / 'coverage') # Replace whatever the status, as if we configured the location.
150
+ coveragepath.unlink() # Can't simply use rename cross-device in release case.
151
151
  assert not status
152
152
 
153
153
  def readme(self):
@@ -197,7 +197,7 @@ except AttributeError:
197
197
  with openresource(__name__, 'README.md.aridt') as f:
198
198
  (-config).processtemplate(f, g)
199
199
  g.flush()
200
- completed = diff(g.name, os.path.join(self.info.projectdir, 'README.md'), check = False)
200
+ completed = diff(g.name, self.info.projectdir / 'README.md', check = False)
201
201
  sys.stdout.write(completed.stdout)
202
202
  assert completed.returncode in {0, 1}
203
203
  assert all('<' != l[0] for l in completed.stdout.splitlines())
@@ -1,53 +1,44 @@
1
1
  from collections import defaultdict
2
2
  from lagoon import git
3
3
  from lagoon.program import partial
4
+ from pathlib import Path
5
+ from venvpool import dotpy
4
6
  import xml.dom.minidom as dom, os
5
7
 
6
8
  class Files:
7
9
 
8
10
  @staticmethod
9
11
  def _findfiles(walkpath, suffixes, prefixes):
10
- def acceptname():
11
- for suffix in suffixes:
12
- if name.endswith(suffix):
13
- return True
14
- for prefix in prefixes:
15
- if name.startswith(prefix):
16
- return True
17
- prefixlen = len(walkpath + os.sep)
18
12
  for dirpath, dirnames, filenames in os.walk(walkpath):
19
13
  for name in sorted(filenames):
20
- if acceptname():
21
- yield os.path.join(dirpath, name)[prefixlen:]
14
+ if any(name.endswith(suffix) for suffix in suffixes) or any(name.startswith(prefix) for prefix in prefixes):
15
+ yield Path(dirpath, name).relative_to(walkpath)
22
16
  dirnames.sort()
23
17
 
24
18
  @classmethod
25
19
  def relpaths(cls, root, suffixes, prefixes):
26
20
  paths = list(cls._findfiles(root, suffixes, prefixes))
27
- if os.path.exists(os.path.join(root, '.gitmodules')):
28
- for submoduleslash in (l.split(' ', 1)[1] + os.sep for l in git.config('--file', '.gitmodules', '--get-regexp', '^submodule[.].+[.]path$', cwd = root).splitlines()):
29
- paths = [p for p in paths if not p.startswith(submoduleslash)]
30
21
  if paths:
31
22
  with git.check_ignore[partial](*paths, check = False, cwd = root) as p:
32
23
  ignored = set(p.stdout.read().splitlines())
33
24
  assert p.wait() in [0, 1]
34
25
  for path in paths:
35
- if path not in ignored:
26
+ if str(path) not in ignored:
36
27
  yield path
37
28
 
38
29
  def __init__(self, root):
39
- srcsuffixes = sum(([s, f"{s}.aridt"] for s in ['.py', '.py3', '.pyx', '.s', '.sh', '.h', '.cpp', '.cxx', '.arid', '.gradle', '.java', '.mk', '.md']), [])
40
- self.allsrcpaths = [os.path.join(root, p) for p in self.relpaths(root, srcsuffixes, ['Dockerfile', 'Makefile'])]
41
- self.docpaths = [p for p in self.allsrcpaths if p.endswith('.md')]
42
- self.pypaths = [p for p in self.allsrcpaths if p.endswith('.py')]
30
+ srcsuffixes = [x for s in ['.py', '.py3', '.pyx', '.s', '.sh', '.h', '.cpp', '.cxx', '.arid', '.gradle', '.java', '.mk', '.md'] for x in [s, f"{s}.aridt"]]
31
+ self.allsrcpaths = [root / p for p in self.relpaths(root, srcsuffixes, ['Dockerfile', 'Makefile'])]
32
+ self.docpaths = [p for p in self.allsrcpaths if p.name.endswith('.md')]
33
+ self.pypaths = [p for p in self.allsrcpaths if p.name.endswith('.py')]
43
34
  self.root = root
44
35
 
45
36
  def testpaths(self, reportpath):
46
37
  paths = [p for p in self.pypaths if os.path.basename(p).startswith('test_')] + self.docpaths
47
- if os.path.exists(reportpath):
48
- with open(reportpath) as f:
38
+ if reportpath.exists():
39
+ with reportpath.open() as f:
49
40
  doc = dom.parse(f)
50
- nametopath = dict([p[len(self.root + os.sep):-len('.py')].replace(os.sep, '.'), p] for p in paths)
41
+ nametopath = {'.'.join(p.relative_to(self.root).parts)[:-len(dotpy)]: p for p in paths} # FIXME: Correctly handle docpaths.
51
42
  pathtotime = defaultdict(int)
52
43
  for e in doc.getElementsByTagName('testcase'):
53
44
  name = e.getAttribute('classname')
@@ -1,4 +1,4 @@
1
- import hashlib, os, re, shlex, sys
1
+ import hashlib, re, shlex, sys
2
2
 
3
3
  gpltemplate = """# Copyright {years} {author}
4
4
 
@@ -25,9 +25,9 @@ def _hassuffix(name, *suffixes):
25
25
  return name.endswith(suffixes) or name.endswith(tuple(f"{s}.aridt" for s in suffixes))
26
26
 
27
27
  def _checkmd5(info, name, expected):
28
- licpath = os.path.join(info.projectdir, name)
28
+ licpath = info.projectdir / name
29
29
  md5 = hashlib.md5()
30
- with open(licpath) as f:
30
+ with licpath.open() as f:
31
31
  md5.update(f.read().encode('utf_8'))
32
32
  if expected != md5.hexdigest():
33
33
  raise Exception(licpath)
@@ -47,7 +47,7 @@ def licheck(info, paths):
47
47
  name = info.config.name,
48
48
  ))
49
49
  elif 'MIT' == name:
50
- with open(info.mitpath()) as f:
50
+ with info.mitpath().open() as f:
51
51
  sections.append(''.join(('# ' if l.rstrip() else '#') + l for l in f))
52
52
  elif 'UNLICENSE' == name:
53
53
  pass
@@ -55,21 +55,21 @@ def licheck(info, paths):
55
55
  raise Exception(name)
56
56
  master = ''.join(s + '\n' for s in sections) # Check each section ends with 2 newlines.
57
57
  def checkone(path):
58
- with open(path) as f:
58
+ with path.open() as f:
59
59
  text = f.read()
60
60
  if text.startswith('#!'):
61
61
  for _ in range(2):
62
62
  text = text[text.index('\n') + 1:]
63
- if _hassuffix(path, '.s'):
63
+ if _hassuffix(path.name, '.s'):
64
64
  text = re.sub('^;', '#', text, flags = re.MULTILINE)
65
- elif _hassuffix(path, '.h', '.cpp', '.cxx', '.gradle', '.java'):
65
+ elif _hassuffix(path.name, '.h', '.cpp', '.cxx', '.gradle', '.java'):
66
66
  text = re.sub('^//', '#', text, flags = re.MULTILINE)
67
- elif _hassuffix(path, '.arid'):
67
+ elif _hassuffix(path.name, '.arid'):
68
68
  text = re.sub('^:', '#', text, flags = re.MULTILINE)
69
69
  return master == text[:len(master)]
70
70
  badpaths = [p for p in paths if not checkone(p)]
71
71
  if badpaths:
72
- raise Exception(' '.join(map(shlex.quote, badpaths)))
72
+ raise Exception(' '.join(map(shlex.quote, map(str, badpaths))))
73
73
  if 'GPL' in info.config.licenses:
74
74
  _checkmd5(info, 'COPYING', 'd32239bcb673463ab874e80d47fae504')
75
75
  if 'UNLICENSE' in info.config.licenses:
@@ -1,15 +1,14 @@
1
1
  'Pin requires to their minimum allowed versions.'
2
2
  from .projectinfo import ProjectInfo
3
- from pathlib import Path
4
3
  from venvpool import initlogging
5
4
 
6
5
  def main():
7
6
  initlogging()
8
7
  info = ProjectInfo.seek('.')
9
8
  minreqs = [r.minstr() for r in info.parsedrequires()]
10
- with Path(info.projectdir, 'project.arid').open('a') as f:
9
+ with (info.projectdir / 'project.arid').open('a') as f:
11
10
  print(f"requires = $list({' '.join(minreqs)})", file = f)
12
- Path(info.projectdir, 'requirements.txt').write_text(''.join(f"{r}\n" for r in minreqs) if minreqs else '# This file blank.\n')
11
+ (info.projectdir / 'requirements.txt').write_text(''.join(f"{r}\n" for r in minreqs) if minreqs else '# This file blank.\n')
13
12
 
14
13
  if '__main__' == __name__:
15
14
  main()
@@ -4,7 +4,7 @@ class MoreThanOneEolStyleException(Exception): pass
4
4
 
5
5
  def nlcheck(paths):
6
6
  for path in paths:
7
- with open(path, 'rb') as f:
7
+ with path.open('rb') as f:
8
8
  text = f.read().decode()
9
9
  eols = set(re.findall(r'\r\n|[\r\n]', text))
10
10
  if len(eols) > 1:
@@ -5,6 +5,7 @@ from aridity.config import ConfigCtrl
5
5
  from diapyr.util import bfs
6
6
  from lagoon import git
7
7
  from lagoon.program import Program
8
+ from pathlib import Path
8
9
  from pkg_resources import resource_filename
9
10
  from shutil import rmtree
10
11
  from tempfile import mkdtemp
@@ -61,16 +62,16 @@ console_scripts := $list()
61
62
  cc.printf('" = $(%s)', quote)
62
63
  cc.processtemplate(
63
64
  resource_filename(__name__, template), # TODO LATER: Make aridity get the resource.
64
- os.path.abspath(os.path.join(info.projectdir, name)))
65
+ os.path.abspath(info.projectdir / name))
65
66
 
66
67
  def main():
67
68
  initlogging()
68
69
  parser = ArgumentParser()
69
70
  parser.add_argument('--transient', action = 'store_true')
70
71
  parser.add_argument('--version')
71
- parser.add_argument('projectdir', nargs = '?') # FIXME: When projectdir is passed in its console_scripts are not populated!
72
+ parser.add_argument('projectdir', nargs = '?', type = Path) # FIXME: When projectdir is passed in its console_scripts are not populated!
72
73
  args = parser.parse_args()
73
- info = ProjectInfo.seek('.') if args.projectdir is None else ProjectInfo(args.projectdir, os.path.join(args.projectdir, ProjectInfo.projectaridname))
74
+ info = ProjectInfo.seek('.') if args.projectdir is None else ProjectInfo(args.projectdir, args.projectdir / ProjectInfo.projectaridname)
74
75
  pipify(info, args.version)
75
76
  setupcommand(info, sys.version_info.major, args.transient, 'egg_info')
76
77
 
@@ -118,7 +119,7 @@ class InstallDeps:
118
119
  continue
119
120
  if self.siblings:
120
121
  siblingpath = r.siblingpath(i.contextworkspace())
121
- if os.path.exists(siblingpath):
122
+ if siblingpath.exists():
122
123
  editableprojects[name] = j = ProjectInfo.seek(siblingpath)
123
124
  yield j, True
124
125
  continue
@@ -143,7 +144,7 @@ class InstallDeps:
143
144
  return adddeps(*t)
144
145
  for i in volatileprojects.values(): # Assume editables already pipified.
145
146
  pipify(i)
146
- self.localreqs = [i.projectdir for i in editableprojects.values()]
147
+ self.localreqs = [str(i.projectdir) for i in editableprojects.values()]
147
148
  self.volatileprojects = volatileprojects.values()
148
149
  self.fetchreqs = list(Req.published(pypireqs))
149
150
  return self
@@ -152,7 +153,7 @@ class InstallDeps:
152
153
  self.fetchreqs.extend(Req.parselines(requires))
153
154
 
154
155
  def invoke(self, venv):
155
- venv.install([i.projectdir for i in self.volatileprojects] + [r.reqstr for r in self.fetchreqs])
156
+ venv.install([str(i.projectdir) for i in self.volatileprojects] + [r.reqstr for r in self.fetchreqs])
156
157
 
157
158
  def cinvoke(self, container):
158
159
  container.install([f"/installdeps/{os.path.relpath(i.projectdir, self.workspace).replace(os.sep, '/')}" for i in self.volatileprojects] + [r.reqstr for r in self.fetchreqs])
@@ -9,7 +9,6 @@ from inspect import getsource
9
9
  from lagoon import git
10
10
  from lagoon.binary import tidy
11
11
  from lagoon.program import Program
12
- from pathlib import Path
13
12
  from pkg_resources import parse_requirements
14
13
  from setuphacks import getsetupkwargs
15
14
  from urllib.error import HTTPError
@@ -77,10 +76,10 @@ class Req:
77
76
  return versionstr in self.parsed
78
77
 
79
78
  def siblingpath(self, workspace):
80
- return os.path.join(workspace, self.namepart)
79
+ return workspace / self.namepart
81
80
 
82
81
  def isproject(self, info):
83
- return os.path.exists(self.siblingpath(info.contextworkspace()))
82
+ return self.siblingpath(info.contextworkspace()).exists()
84
83
 
85
84
  def minstr(self):
86
85
  version, = (s.version for s in self.specifierset if s.operator in {'>=', '=='})
@@ -110,10 +109,10 @@ class ProjectInfo:
110
109
 
111
110
  @classmethod
112
111
  def seek(cls, realdir):
113
- path = Seek.seek(realdir, cls.projectaridname)
114
- if path is None:
112
+ seek = Seek.seek(realdir, cls.projectaridname)
113
+ if seek is None:
115
114
  raise ProjectInfoNotFoundException(realdir)
116
- return cls(path.parent, path)
115
+ return cls(seek.parent, seek.path)
117
116
 
118
117
  @classmethod
119
118
  def seekany(cls, realdir):
@@ -121,17 +120,17 @@ class ProjectInfo:
121
120
  return cls.seek(realdir)
122
121
  except ProjectInfoNotFoundException:
123
122
  pass
124
- setuppath = Seek.seek(realdir, 'setup.py')
125
- if setuppath is not None:
123
+ setupseek = Seek.seek(realdir, 'setup.py')
124
+ if setupseek is not None:
126
125
  log.info('Use setuptools mode.')
127
- return _setuptoolsinfo(setuppath)
126
+ return _setuptoolsinfo(setupseek.path)
128
127
  log.info('Use uninstallable mode.')
129
- projectdir = os.path.dirname(Seek.seek(realdir, '.git'))
128
+ projectdir = Seek.seek(realdir, '.git').path.parent
130
129
  with openresource(__name__, 'setuptools.arid') as f:
131
130
  info = cls(projectdir, f)
132
131
  info.config.name = os.path.basename(os.path.abspath(projectdir))
133
132
  try:
134
- info.allrequires.extend((Path(projectdir) / 'requirements.txt').read_text().splitlines())
133
+ info.allrequires.extend((projectdir / 'requirements.txt').read_text().splitlines())
135
134
  except FileNotFoundError:
136
135
  pass
137
136
  return info
@@ -146,10 +145,10 @@ class ProjectInfo:
146
145
  self.projectdir = projectdir
147
146
 
148
147
  def mitpath(self):
149
- return os.path.join(self.projectdir, self.config.MIT.path)
148
+ return self.projectdir / self.config.MIT.path
150
149
 
151
150
  def contextworkspace(self):
152
- return os.path.join(self.projectdir, '..')
151
+ return self.projectdir / '..'
153
152
 
154
153
  def parsedrequires(self):
155
154
  return Req.parselines(self.allrequires)
@@ -211,7 +210,7 @@ class MainModule:
211
210
 
212
211
  def _setuptoolsinfo(setuppath):
213
212
  with openresource(__name__, 'setuptools.arid') as f:
214
- info = ProjectInfo(os.path.dirname(setuppath), f)
213
+ info = ProjectInfo(setuppath.parent, f)
215
214
  setupkwargs = getsetupkwargs(setuppath, ['name', 'install_requires', 'entry_points'])
216
215
  if 'name' in setupkwargs:
217
216
  info.config.name = setupkwargs['name']
@@ -93,11 +93,8 @@ def main():
93
93
  copytree(info.projectdir, copydir)
94
94
  for relpath in release(config, srcgit, ProjectInfo.seek(copydir)):
95
95
  log.info("Replace artifact: %s", relpath)
96
- destpath = os.path.join(info.projectdir, relpath)
97
- try:
98
- os.makedirs(os.path.dirname(destpath))
99
- except OSError:
100
- pass
96
+ destpath = info.projectdir / relpath
97
+ destpath.parent.mkdir(exist_ok = True, parents = True)
101
98
  copy2(os.path.join(copydir, relpath), destpath)
102
99
 
103
100
  def uploadableartifacts(artifactrelpaths):
@@ -141,7 +138,7 @@ def release(config, srcgit, info):
141
138
  (os.remove if name.endswith('.py') else rmtree)(path)
142
139
  _warmups(info)
143
140
  pipify(info, version)
144
- rmtree(os.path.join(info.projectdir, '.git'))
141
+ rmtree(info.projectdir / '.git')
145
142
  setupcommands = []
146
143
  if SourceInfo(info.projectdir).extpaths:
147
144
  for image in _images():
@@ -149,7 +146,7 @@ def release(config, srcgit, info):
149
146
  else:
150
147
  setupcommands.append('bdist_wheel')
151
148
  _runsetup(info, setupcommands + ['sdist'])
152
- artifactrelpaths = [os.path.join(distrelpath, name) for name in sorted(os.listdir(os.path.join(info.projectdir, distrelpath)))]
149
+ artifactrelpaths = [os.path.join(distrelpath, name) for name in sorted(os.listdir(info.projectdir / distrelpath))]
153
150
  if config.upload:
154
151
  srcgit.tag[print](f"v{version}")
155
152
  # TODO LATER: If tag succeeded but push fails, we're left with a bogus tag.
@@ -1,6 +1,7 @@
1
1
  from contextlib import contextmanager
2
2
  from lagoon import docker
3
3
  from lagoon.program import NOEOL
4
+ from pathlib import Path
4
5
  import os, re, sys
5
6
 
6
7
  pyversiontags = {2: ['2'], 3: ['3.9', '3.10', '3.11', '3.12', '3.13']}
@@ -31,16 +32,19 @@ class Excludes:
31
32
  def __contains__(self, relpath):
32
33
  return self.pattern.search(relpath) is not None
33
34
 
34
- class Seek(str):
35
+ class Seek:
35
36
 
36
37
  @classmethod
37
38
  def seek(cls, dirpath, name):
39
+ dirpath = Path(dirpath)
38
40
  while True:
39
- path = cls(os.path.join(dirpath, name))
40
- if os.path.exists(path):
41
- path.parent = dirpath
42
- return path
43
- parent = os.path.join(dirpath, '..')
41
+ path = dirpath / name
42
+ if path.exists():
43
+ seek = cls()
44
+ seek.path = path
45
+ seek.parent = dirpath
46
+ return seek
47
+ parent = dirpath / '..'
44
48
  if os.path.abspath(parent) == os.path.abspath(dirpath):
45
49
  break
46
50
  dirpath = parent
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 103
3
+ Version: 104
4
4
  Summary: Manage development of multiple Python projects
5
5
  Home-page: https://pypi.org/project/pyven/
6
6
  Author: Homsar
@@ -44,7 +44,7 @@ class SourceInfo:
44
44
  sourceinfo = SourceInfo('.')
45
45
  setup(
46
46
  name = 'pyven',
47
- version = '103',
47
+ version = '104',
48
48
  description = 'Manage development of multiple Python projects',
49
49
  long_description = long_description(),
50
50
  long_description_content_type = 'text/markdown',
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