pyven 102__tar.gz → 103__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-102 → pyven-103}/PKG-INFO +1 -1
- {pyven-102 → pyven-103}/pyven/bdist.py +8 -6
- {pyven-102 → pyven-103}/pyven/checks.py +9 -16
- {pyven-102 → pyven-103}/pyven/files.py +7 -5
- {pyven-102 → pyven-103}/pyven/pipify.py +8 -5
- {pyven-102 → pyven-103}/pyven/projectinfo.py +16 -15
- {pyven-102 → pyven-103}/pyven/release.py +12 -12
- {pyven-102 → pyven-103}/pyven/tasks.py +6 -5
- {pyven-102 → pyven-103}/pyven/tryinstall.py +1 -2
- {pyven-102 → pyven-103}/pyven/util.py +2 -2
- {pyven-102 → pyven-103}/pyven.egg-info/PKG-INFO +1 -1
- {pyven-102 → pyven-103}/setup.py +1 -1
- {pyven-102 → pyven-103}/README.md +0 -0
- {pyven-102 → pyven-103}/pyven/README.md.aridt +0 -0
- {pyven-102 → pyven-103}/pyven/__init__.py +0 -0
- {pyven-102 → pyven-103}/pyven/divcheck.py +0 -0
- {pyven-102 → pyven-103}/pyven/execcheck.py +0 -0
- {pyven-102 → pyven-103}/pyven/functions.py +0 -0
- {pyven-102 → pyven-103}/pyven/licheck.py +0 -0
- {pyven-102 → pyven-103}/pyven/mainmodules.py +0 -0
- {pyven-102 → pyven-103}/pyven/minreqs.py +0 -0
- {pyven-102 → pyven-103}/pyven/nlcheck.py +0 -0
- {pyven-102 → pyven-103}/pyven/patchpolicy.py +0 -0
- {pyven-102 → pyven-103}/pyven/projectinfo.arid +0 -0
- {pyven-102 → pyven-103}/pyven/pyproject.toml.aridt +0 -0
- {pyven-102 → pyven-103}/pyven/release.arid +0 -0
- {pyven-102 → pyven-103}/pyven/setup.cfg.aridt +0 -0
- {pyven-102 → pyven-103}/pyven/setup.py.aridt +0 -0
- {pyven-102 → pyven-103}/pyven/setuptools.arid +0 -0
- {pyven-102 → pyven-103}/pyven/sourceinfo.py +0 -0
- {pyven-102 → pyven-103}/pyven/tests/__init__.py +0 -0
- {pyven-102 → pyven-103}/pyven.egg-info/SOURCES.txt +0 -0
- {pyven-102 → pyven-103}/pyven.egg-info/dependency_links.txt +0 -0
- {pyven-102 → pyven-103}/pyven.egg-info/entry_points.txt +0 -0
- {pyven-102 → pyven-103}/pyven.egg-info/requires.txt +0 -0
- {pyven-102 → pyven-103}/pyven.egg-info/top_level.txt +0 -0
- {pyven-102 → pyven-103}/setup.cfg +0 -0
{pyven-102 → pyven-103}/PKG-INFO
RENAMED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from argparse import ArgumentParser
|
|
2
2
|
from glob import iglob
|
|
3
|
+
from shutil import copy2, rmtree
|
|
4
|
+
from subprocess import CalledProcessError, check_call
|
|
3
5
|
from tempfile import mkdtemp
|
|
4
|
-
import logging, os
|
|
6
|
+
import logging, os
|
|
5
7
|
|
|
6
8
|
log = logging.getLogger(__name__)
|
|
7
9
|
distdir = 'dist'
|
|
@@ -18,19 +20,19 @@ def main():
|
|
|
18
20
|
compatibility = pip.split(os.sep)[3]
|
|
19
21
|
log.info("Make wheel(s) for implementation-ABI: %s", compatibility)
|
|
20
22
|
try:
|
|
21
|
-
|
|
22
|
-
except
|
|
23
|
+
check_call([pip, '--no-cache-dir', 'wheel', '--no-deps', '-w', holder, '.'])
|
|
24
|
+
except CalledProcessError:
|
|
23
25
|
log.warning('Skip compatibility:', exc_info = True)
|
|
24
26
|
continue
|
|
25
27
|
wheelpath, = (os.path.join(holder, n) for n in os.listdir(holder))
|
|
26
|
-
|
|
28
|
+
check_call(['auditwheel', 'repair', '--plat', args.plat, '-w', distdir, wheelpath])
|
|
27
29
|
plaintarget = os.path.join(distdir, os.path.basename(wheelpath))
|
|
28
30
|
if os.path.exists(plaintarget):
|
|
29
31
|
log.info("Replace plain wheel: %s", plaintarget)
|
|
30
|
-
|
|
32
|
+
copy2(wheelpath, distdir)
|
|
31
33
|
os.remove(wheelpath)
|
|
32
34
|
finally:
|
|
33
|
-
|
|
35
|
+
rmtree(holder)
|
|
34
36
|
|
|
35
37
|
if ('__main__' == __name__):
|
|
36
38
|
main()
|
|
@@ -8,14 +8,16 @@ from aridity.config import ConfigCtrl
|
|
|
8
8
|
from aridity.util import NoSuchPathException, openresource
|
|
9
9
|
from diapyr.util import singleton
|
|
10
10
|
from itertools import chain
|
|
11
|
-
from lagoon import diff
|
|
12
|
-
from lagoon.program import NOEOL, partial
|
|
11
|
+
from lagoon import diff, docker, id, pydoc_markdown
|
|
12
|
+
from lagoon.program import NOEOL, partial, Program
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
from setuptools import find_packages
|
|
15
|
-
from shutil import copytree, ignore_patterns
|
|
15
|
+
from shutil import copy2, copytree, ignore_patterns
|
|
16
16
|
from tempfile import NamedTemporaryFile
|
|
17
|
+
from urllib.request import urlopen
|
|
17
18
|
from venvpool import dotpy, initlogging, Pool, Task, TemporaryDirectory
|
|
18
|
-
|
|
19
|
+
from xml.sax.saxutils import escape as xml_escape
|
|
20
|
+
import logging, os, re, sys
|
|
19
21
|
|
|
20
22
|
log = logging.getLogger(__name__)
|
|
21
23
|
skip = object()
|
|
@@ -84,7 +86,7 @@ class EveryVersion:
|
|
|
84
86
|
def divcheck():
|
|
85
87
|
if pyversion >= 3:
|
|
86
88
|
return skip
|
|
87
|
-
|
|
89
|
+
Program.text(f"python{pyversion}")[print](scriptpath, *self.files.pypaths)
|
|
88
90
|
for pyversion in self.info.config.pyversions:
|
|
89
91
|
_runcheck(pyversion, divcheck)
|
|
90
92
|
|
|
@@ -118,7 +120,6 @@ class EveryVersion:
|
|
|
118
120
|
for command in ['apt-get', 'update'], ['apt-get', 'install', '-y', 'sudo'] + upstream_devel_packages:
|
|
119
121
|
container.call(command, check = True, root = True)
|
|
120
122
|
for script in upstream_devel_scripts:
|
|
121
|
-
from lagoon import docker
|
|
122
123
|
dirpath = docker.exec[NOEOL](container.container, 'mktemp', '-d') # No need to cleanup, will die with container.
|
|
123
124
|
log.debug("In container dir %s run script: %s", dirpath, script)
|
|
124
125
|
docker.exec[print]('-w', dirpath, '-t', container.container, 'sh', '-c', script)
|
|
@@ -145,7 +146,7 @@ except AttributeError:
|
|
|
145
146
|
'--with-cov', '--cov-report', 'term-missing',
|
|
146
147
|
] + sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []) + self.files.testpaths(xmlpath) + self.noseargs)
|
|
147
148
|
if os.path.exists(coveragepath):
|
|
148
|
-
|
|
149
|
+
copy2(coveragepath, os.path.join(reportsdir, 'coverage')) # Replace whatever the status, as if we configured the location.
|
|
149
150
|
os.remove(coveragepath) # Can't simply use rename cross-device in release case.
|
|
150
151
|
assert not status
|
|
151
152
|
|
|
@@ -155,7 +156,6 @@ except AttributeError:
|
|
|
155
156
|
return o
|
|
156
157
|
raise NoSuchPathException('Empty set.')
|
|
157
158
|
def getpydoc(mainmodules):
|
|
158
|
-
from lagoon import pydoc_markdown
|
|
159
159
|
with TemporaryDirectory() as pydocparent:
|
|
160
160
|
pydocdir = os.path.join(pydocparent, 'project')
|
|
161
161
|
copytree(self.info.projectdir, pydocdir, ignore = ignore_patterns('test_*'))
|
|
@@ -216,10 +216,8 @@ except AttributeError:
|
|
|
216
216
|
account = self.info.config.linktree.account
|
|
217
217
|
if account is None:
|
|
218
218
|
return skip
|
|
219
|
-
from urllib.request import urlopen
|
|
220
|
-
from xml.sax.saxutils import escape
|
|
221
219
|
with urlopen(f"https://linktr.ee/{account}") as f: # TODO: Percent-encode.
|
|
222
|
-
assert f">{
|
|
220
|
+
assert f">{xml_escape(self.info.config.name)} \N{BULLET} {xml_escape(self.info.config.tagline)}<" in f.read().decode('utf-8') # TODO: Deduce encoding, consider lagoon URL.
|
|
223
221
|
_runcheck('*', linktree)
|
|
224
222
|
|
|
225
223
|
class Container:
|
|
@@ -227,19 +225,16 @@ class Container:
|
|
|
227
225
|
workdir = '/io'
|
|
228
226
|
|
|
229
227
|
def __init__(self, container):
|
|
230
|
-
from lagoon import id
|
|
231
228
|
self.uid = int(id._u())
|
|
232
229
|
self.gid = int(id._g())
|
|
233
230
|
self.container = container
|
|
234
231
|
|
|
235
232
|
def inituser(self):
|
|
236
|
-
from lagoon import docker
|
|
237
233
|
docker.exec[print](self.container, 'groupadd', '-g', os.stat('/var/run/docker.sock').st_gid, 'docker')
|
|
238
234
|
docker.exec[print](self.container, 'groupadd', '-g', self.gid, 'pyvengroup')
|
|
239
235
|
docker.exec[print](self.container, 'useradd', '-g', self.gid, '-G', 'docker', '-u', self.uid, '-m', 'pyvenuser')
|
|
240
236
|
|
|
241
237
|
def initapt(self):
|
|
242
|
-
from lagoon import docker
|
|
243
238
|
initapt(docker.exec[partial, print](self.container))
|
|
244
239
|
|
|
245
240
|
def install(self, args):
|
|
@@ -247,11 +242,9 @@ class Container:
|
|
|
247
242
|
self.call(['pip', 'install', '--user', *args], check = True)
|
|
248
243
|
|
|
249
244
|
def call(self, args, check = False, root = False):
|
|
250
|
-
from lagoon import docker
|
|
251
245
|
return docker.exec[print]('-w', self.workdir, self.container, *[] if root else ['sudo', '-u', 'pyvenuser', 'PATH=/home/pyvenuser/.local/bin:/usr/local/bin:/usr/bin:/bin', 'env'], *args, check = check)
|
|
252
246
|
|
|
253
247
|
def cp(self, src, dest):
|
|
254
|
-
from lagoon import docker
|
|
255
248
|
docker.cp[print](src, f"{self.container}:{dest}")
|
|
256
249
|
|
|
257
250
|
def main():
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from collections import defaultdict
|
|
2
|
-
|
|
2
|
+
from lagoon import git
|
|
3
|
+
from lagoon.program import partial
|
|
4
|
+
import xml.dom.minidom as dom, os
|
|
3
5
|
|
|
4
6
|
class Files:
|
|
5
7
|
|
|
@@ -23,12 +25,12 @@ class Files:
|
|
|
23
25
|
def relpaths(cls, root, suffixes, prefixes):
|
|
24
26
|
paths = list(cls._findfiles(root, suffixes, prefixes))
|
|
25
27
|
if os.path.exists(os.path.join(root, '.gitmodules')):
|
|
26
|
-
for submoduleslash in (l.split(' ', 1)[1] + os.sep for l in
|
|
28
|
+
for submoduleslash in (l.split(' ', 1)[1] + os.sep for l in git.config('--file', '.gitmodules', '--get-regexp', '^submodule[.].+[.]path$', cwd = root).splitlines()):
|
|
27
29
|
paths = [p for p in paths if not p.startswith(submoduleslash)]
|
|
28
30
|
if paths:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
with git.check_ignore[partial](*paths, check = False, cwd = root) as p:
|
|
32
|
+
ignored = set(p.stdout.read().splitlines())
|
|
33
|
+
assert p.wait() in [0, 1]
|
|
32
34
|
for path in paths:
|
|
33
35
|
if path not in ignored:
|
|
34
36
|
yield path
|
|
@@ -3,10 +3,13 @@ from .projectinfo import ProjectInfo, Req, SimpleInstallDeps
|
|
|
3
3
|
from argparse import ArgumentParser
|
|
4
4
|
from aridity.config import ConfigCtrl
|
|
5
5
|
from diapyr.util import bfs
|
|
6
|
+
from lagoon import git
|
|
7
|
+
from lagoon.program import Program
|
|
6
8
|
from pkg_resources import resource_filename
|
|
9
|
+
from shutil import rmtree
|
|
7
10
|
from tempfile import mkdtemp
|
|
8
11
|
from venvpool import initlogging, Pool
|
|
9
|
-
import logging, os,
|
|
12
|
+
import logging, os, sys
|
|
10
13
|
|
|
11
14
|
log = logging.getLogger(__name__)
|
|
12
15
|
|
|
@@ -73,7 +76,7 @@ def main():
|
|
|
73
76
|
|
|
74
77
|
def setupcommand(info, pyversion, transient, *command):
|
|
75
78
|
def setup(absexecutable):
|
|
76
|
-
|
|
79
|
+
Program.text(absexecutable)[print]('setup.py', *command, cwd = info.projectdir)
|
|
77
80
|
if {'setuptools', 'wheel'} == set(info.allbuildrequires) and sys.version_info.major == pyversion:
|
|
78
81
|
setup(sys.executable)
|
|
79
82
|
else:
|
|
@@ -125,8 +128,8 @@ class InstallDeps:
|
|
|
125
128
|
if self.siblings:
|
|
126
129
|
log.warning("Not a sibling, install from repo: %s", name)
|
|
127
130
|
clonepath = os.path.join(self.workspace, name)
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
git.clone[print]('--depth', 1, f"file://{repopath}", clonepath)
|
|
132
|
+
git.fetch.__tags[print](cwd = clonepath)
|
|
130
133
|
volatileprojects[name] = j = ProjectInfo.seek(clonepath)
|
|
131
134
|
yield j, False
|
|
132
135
|
continue
|
|
@@ -155,7 +158,7 @@ class InstallDeps:
|
|
|
155
158
|
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])
|
|
156
159
|
|
|
157
160
|
def __exit__(self, *exc_info):
|
|
158
|
-
|
|
161
|
+
rmtree(self.workspace)
|
|
159
162
|
|
|
160
163
|
if '__main__' == __name__:
|
|
161
164
|
main()
|
|
@@ -4,12 +4,19 @@ 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
|
+
from http import HTTPStatus
|
|
7
8
|
from inspect import getsource
|
|
9
|
+
from lagoon import git
|
|
10
|
+
from lagoon.binary import tidy
|
|
11
|
+
from lagoon.program import Program
|
|
8
12
|
from pathlib import Path
|
|
9
13
|
from pkg_resources import parse_requirements
|
|
10
14
|
from setuphacks import getsetupkwargs
|
|
15
|
+
from urllib.error import HTTPError
|
|
16
|
+
from urllib.parse import quote as url_quote
|
|
17
|
+
from urllib.request import Request, urlopen
|
|
11
18
|
from venvpool import ParsedRequires, TemporaryDirectory
|
|
12
|
-
import logging, os, re,
|
|
19
|
+
import xml.dom.minidom as dom, json, logging, os, re, time, venvpool
|
|
13
20
|
|
|
14
21
|
log = logging.getLogger(__name__)
|
|
15
22
|
|
|
@@ -36,14 +43,10 @@ class Req:
|
|
|
36
43
|
|
|
37
44
|
@classmethod
|
|
38
45
|
def published(cls, reqstrs):
|
|
39
|
-
from http import HTTPStatus
|
|
40
|
-
from urllib.error import HTTPError
|
|
41
|
-
from urllib.parse import quote
|
|
42
|
-
from urllib.request import Request, urlopen
|
|
43
46
|
for r in cls.parselines(reqstrs):
|
|
44
47
|
try:
|
|
45
48
|
# FIXME: Allow running tests offline.
|
|
46
|
-
with urlopen(Request(f"https://pypi.org/simple/{
|
|
49
|
+
with urlopen(Request(f"https://pypi.org/simple/{url_quote(r.namepart, safe = '')}/", method = 'HEAD')):
|
|
47
50
|
pass
|
|
48
51
|
yield r
|
|
49
52
|
except HTTPError as e:
|
|
@@ -155,26 +158,24 @@ class ProjectInfo:
|
|
|
155
158
|
return [r.namepart for r in self.parsedrequires() if r.isproject(self)]
|
|
156
159
|
|
|
157
160
|
def nextversion(self): # XXX: Deduce from tags instead?
|
|
158
|
-
import urllib.request, urllib.error, re, xml.dom.minidom as dom
|
|
159
161
|
pattern = re.compile('-([0-9]+)[-.]')
|
|
160
162
|
try:
|
|
161
|
-
with
|
|
162
|
-
doc = dom.parseString(
|
|
163
|
+
with urlopen(f"https://pypi.org/simple/{self.config.name}/") as f:
|
|
164
|
+
doc = dom.parseString(tidy._asxml(input = f.read()))
|
|
163
165
|
last = max(int(pattern.search(textcontent(a)).group(1)) for a in doc.getElementsByTagName('a'))
|
|
164
|
-
except
|
|
166
|
+
except HTTPError as e:
|
|
165
167
|
if 404 != e.code:
|
|
166
168
|
raise
|
|
167
169
|
last = 0
|
|
168
170
|
return str(max(10, last + 1))
|
|
169
171
|
|
|
170
172
|
def descriptionandurl(self):
|
|
171
|
-
import urllib.error, urllib.request, json, time
|
|
172
173
|
urlpath = f"{self.config.github.account}/{self.config.name}"
|
|
173
174
|
while True:
|
|
174
175
|
try:
|
|
175
|
-
with
|
|
176
|
+
with urlopen(f"https://api.github.com/repos/{urlpath}") as f:
|
|
176
177
|
return json.loads(f.read().decode())['description'], f"https://github.com/{urlpath}"
|
|
177
|
-
except
|
|
178
|
+
except HTTPError as e:
|
|
178
179
|
if 403 != e.code:
|
|
179
180
|
raise
|
|
180
181
|
log.info("Sleep 1 minute due to: %s", e)
|
|
@@ -192,14 +193,14 @@ class ProjectInfo:
|
|
|
192
193
|
f.write(getsource(mainmodules))
|
|
193
194
|
with open(os.path.join(tempdir, 'venvpool.py'), 'w') as f:
|
|
194
195
|
f.write(getsource(venvpool))
|
|
195
|
-
for line in
|
|
196
|
+
for line in Program.text(f"python{next(iter(self.config.pyversions))}")(scriptpath, self.projectdir, *paths).splitlines():
|
|
196
197
|
yield MainModule(eval(line))
|
|
197
198
|
|
|
198
199
|
def console_scripts(self):
|
|
199
200
|
return [mm.console_script for mm in self.mainmodules()]
|
|
200
201
|
|
|
201
202
|
def devversion(self):
|
|
202
|
-
releases = [int(t[1:]) for t in
|
|
203
|
+
releases = [int(t[1:]) for t in git.tag(cwd = self.projectdir).splitlines() if 'v' == t[0]]
|
|
203
204
|
return f"{(max(releases) if releases else 0) + 1}.dev0"
|
|
204
205
|
|
|
205
206
|
class MainModule:
|
|
@@ -8,11 +8,13 @@ from argparse import ArgumentParser
|
|
|
8
8
|
from aridity.config import ConfigCtrl
|
|
9
9
|
from diapyr.util import singleton
|
|
10
10
|
from itertools import chain
|
|
11
|
-
from lagoon
|
|
11
|
+
from lagoon import docker, git
|
|
12
|
+
from lagoon.program import NOEOL, partial, Program
|
|
12
13
|
from pkg_resources import resource_filename
|
|
14
|
+
from shutil import copy2, copytree, rmtree
|
|
13
15
|
from tempfile import NamedTemporaryFile
|
|
14
16
|
from venvpool import dotpy, initlogging, Pip, Pool, TemporaryDirectory
|
|
15
|
-
import
|
|
17
|
+
import logging, os, re, sys, sysconfig
|
|
16
18
|
|
|
17
19
|
log = logging.getLogger(__name__)
|
|
18
20
|
distrelpath = 'dist'
|
|
@@ -52,8 +54,6 @@ class Image:
|
|
|
52
54
|
self.arch = arch
|
|
53
55
|
|
|
54
56
|
def makewheels(self, info): # TODO: This code would benefit from modern syntax.
|
|
55
|
-
from lagoon import docker
|
|
56
|
-
from lagoon.program import NOEOL
|
|
57
57
|
log.info("Make wheels for platform: %s", self.plat)
|
|
58
58
|
scripts = list(info.config.devel.scripts)
|
|
59
59
|
packages = list(info.config.devel.packages)
|
|
@@ -83,22 +83,22 @@ def main():
|
|
|
83
83
|
# XXX: Load info config to a scope in our config?
|
|
84
84
|
info = ProjectInfo.seek(config.path)
|
|
85
85
|
config.account = info.config.pypi.account
|
|
86
|
-
|
|
87
|
-
if
|
|
86
|
+
srcgit = git[partial](cwd = info.projectdir)
|
|
87
|
+
if srcgit.status.__porcelain():
|
|
88
88
|
raise Exception('Uncommitted changes!')
|
|
89
89
|
log.debug('No uncommitted changes.')
|
|
90
90
|
with TemporaryDirectory() as tempdir:
|
|
91
91
|
copydir = os.path.join(tempdir, os.path.basename(os.path.abspath(info.projectdir)))
|
|
92
92
|
log.info("Copying project to: %s", copydir)
|
|
93
|
-
|
|
94
|
-
for relpath in release(config,
|
|
93
|
+
copytree(info.projectdir, copydir)
|
|
94
|
+
for relpath in release(config, srcgit, ProjectInfo.seek(copydir)):
|
|
95
95
|
log.info("Replace artifact: %s", relpath)
|
|
96
96
|
destpath = os.path.join(info.projectdir, relpath)
|
|
97
97
|
try:
|
|
98
98
|
os.makedirs(os.path.dirname(destpath))
|
|
99
99
|
except OSError:
|
|
100
100
|
pass
|
|
101
|
-
|
|
101
|
+
copy2(os.path.join(copydir, relpath), destpath)
|
|
102
102
|
|
|
103
103
|
def uploadableartifacts(artifactrelpaths):
|
|
104
104
|
def acceptplatform(platform):
|
|
@@ -127,7 +127,7 @@ def _runsetup(info, commands):
|
|
|
127
127
|
venv.run('check_call', ['.'], 'setup', commands, cwd = info.projectdir) # XXX: Should venvpool automatically include current dir?
|
|
128
128
|
|
|
129
129
|
def release(config, srcgit, info):
|
|
130
|
-
scrub =
|
|
130
|
+
scrub = git.clean._xdi[partial, print](cwd = info.projectdir, input = 'c')
|
|
131
131
|
scrub()
|
|
132
132
|
version = info.nextversion()
|
|
133
133
|
pipify(info, version)
|
|
@@ -138,10 +138,10 @@ def release(config, srcgit, info):
|
|
|
138
138
|
if name.startswith('test_'): # TODO LATER: Allow project to add globs to exclude.
|
|
139
139
|
path = os.path.join(dirpath, name)
|
|
140
140
|
log.debug("Delete: %s", path)
|
|
141
|
-
(os.remove if name.endswith('.py') else
|
|
141
|
+
(os.remove if name.endswith('.py') else rmtree)(path)
|
|
142
142
|
_warmups(info)
|
|
143
143
|
pipify(info, version)
|
|
144
|
-
|
|
144
|
+
rmtree(os.path.join(info.projectdir, '.git'))
|
|
145
145
|
setupcommands = []
|
|
146
146
|
if SourceInfo(info.projectdir).extpaths:
|
|
147
147
|
for image in _images():
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
'Show all XX''X/TO''DO/FIX''ME comments in project.'
|
|
2
2
|
from .files import Files
|
|
3
3
|
from argparse import ArgumentParser
|
|
4
|
-
import
|
|
4
|
+
from lagoon import ag, git
|
|
5
|
+
from lagoon.program import NOEOL, partial
|
|
5
6
|
|
|
6
7
|
def main():
|
|
7
8
|
parser = ArgumentParser()
|
|
8
9
|
parser.add_argument('-q', action = 'count', default = 0)
|
|
9
10
|
config = parser.parse_args()
|
|
10
|
-
root
|
|
11
|
-
agcommand = [
|
|
11
|
+
root = git.rev_parse.__show_toplevel[NOEOL]()
|
|
12
|
+
agcommand = ag.__noheading.__nobreak[partial, print](cwd = root, check = False)
|
|
12
13
|
# XXX: Integrate with declared project resource types?
|
|
13
14
|
paths = list(Files.relpaths(root, ['.py', '.pyx', '.h', '.cpp', '.ui', '.java', '.kt', '.c', '.s', '.sh', '.arid', '.aridt', '.gradle', '.java', '.mk', '.js'], ['Dockerfile', 'Makefile']))
|
|
14
15
|
for tag in ['XX''X', 'TO''DO', 'FIX''ME'][config.q:]:
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
agcommand(f"{tag} LATER", *paths)
|
|
17
|
+
agcommand(f"{tag}(?! LATER)", *paths)
|
|
17
18
|
|
|
18
19
|
if '__main__' == __name__:
|
|
19
20
|
main()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
from .checks import EveryVersion
|
|
3
3
|
from .projectinfo import ProjectInfo
|
|
4
4
|
from .util import bgcontainer, initapt, pyversiontags
|
|
5
|
-
from lagoon import git
|
|
5
|
+
from lagoon import docker, git
|
|
6
6
|
from lagoon.program import partial
|
|
7
7
|
from urllib.request import urlopen
|
|
8
8
|
from venvpool import initlogging
|
|
@@ -11,7 +11,6 @@ import logging, xml.etree.ElementTree as ET
|
|
|
11
11
|
log = logging.getLogger(__name__)
|
|
12
12
|
|
|
13
13
|
def main():
|
|
14
|
-
from lagoon import docker
|
|
15
14
|
initlogging()
|
|
16
15
|
headinfo = ProjectInfo.seek('.')
|
|
17
16
|
if not headinfo.config.pypi.participant: # XXX: Or look for tags?
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
from contextlib import contextmanager
|
|
2
|
+
from lagoon import docker
|
|
3
|
+
from lagoon.program import NOEOL
|
|
2
4
|
import os, re, sys
|
|
3
5
|
|
|
4
6
|
pyversiontags = {2: ['2'], 3: ['3.9', '3.10', '3.11', '3.12', '3.13']}
|
|
@@ -45,8 +47,6 @@ class Seek(str):
|
|
|
45
47
|
|
|
46
48
|
@contextmanager
|
|
47
49
|
def bgcontainer(*dockerrunargs):
|
|
48
|
-
from lagoon import docker
|
|
49
|
-
from lagoon.program import NOEOL
|
|
50
50
|
container = docker.run._d[NOEOL](*dockerrunargs + ('sleep', 'inf'))
|
|
51
51
|
try:
|
|
52
52
|
yield container
|
{pyven-102 → pyven-103}/setup.py
RENAMED
|
@@ -44,7 +44,7 @@ class SourceInfo:
|
|
|
44
44
|
sourceinfo = SourceInfo('.')
|
|
45
45
|
setup(
|
|
46
46
|
name = 'pyven',
|
|
47
|
-
version = '
|
|
47
|
+
version = '103',
|
|
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
|
|
File without changes
|