pyven 96__tar.gz → 98__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-96 → pyven-98}/PKG-INFO +4 -4
- {pyven-96 → pyven-98}/pyven/README.md.aridt +2 -1
- {pyven-96 → pyven-98}/pyven/checks.py +16 -14
- {pyven-96 → pyven-98}/pyven/files.py +3 -2
- {pyven-96 → pyven-98}/pyven/patchpolicy.py +1 -1
- {pyven-96 → pyven-98}/pyven/pipify.py +18 -30
- {pyven-96 → pyven-98}/pyven/projectinfo.arid +9 -4
- {pyven-96 → pyven-98}/pyven/projectinfo.py +11 -13
- pyven-98/pyven/pyproject.toml.aridt +2 -0
- {pyven-96 → pyven-98}/pyven/release.py +6 -7
- {pyven-96 → pyven-98}/pyven/setup.py.aridt +4 -2
- pyven-98/pyven/sourceinfo.py +36 -0
- {pyven-96 → pyven-98}/pyven/tasks.py +1 -1
- {pyven-96 → pyven-98}/pyven/tryinstall.py +1 -4
- {pyven-96 → pyven-98}/pyven/util.py +1 -1
- {pyven-96 → pyven-98}/pyven.egg-info/PKG-INFO +4 -4
- {pyven-96 → pyven-98}/pyven.egg-info/SOURCES.txt +0 -2
- {pyven-96 → pyven-98}/pyven.egg-info/requires.txt +2 -2
- {pyven-96 → pyven-98}/setup.cfg +1 -1
- pyven-98/setup.py +59 -0
- pyven-96/pyven/cythonize.py +0 -29
- pyven-96/pyven/pyproject.toml.aridt +0 -2
- pyven-96/pyven/setup-native.py.aridt +0 -25
- pyven-96/pyven/sourceinfo.py +0 -43
- pyven-96/setup.py +0 -21
- {pyven-96 → pyven-98}/README.md +0 -0
- {pyven-96 → pyven-98}/pyven/__init__.py +0 -0
- {pyven-96 → pyven-98}/pyven/bdist.py +0 -0
- {pyven-96 → pyven-98}/pyven/divcheck.py +0 -0
- {pyven-96 → pyven-98}/pyven/drmake.py +0 -0
- {pyven-96 → pyven-98}/pyven/execcheck.py +0 -0
- {pyven-96 → pyven-98}/pyven/functions.py +0 -0
- {pyven-96 → pyven-98}/pyven/launch.py +0 -0
- {pyven-96 → pyven-98}/pyven/licheck.py +0 -0
- {pyven-96 → pyven-98}/pyven/mainmodules.py +0 -0
- {pyven-96 → pyven-98}/pyven/minreqs.py +0 -0
- {pyven-96 → pyven-98}/pyven/nlcheck.py +0 -0
- {pyven-96 → pyven-98}/pyven/release.arid +0 -0
- {pyven-96 → pyven-98}/pyven/setup.cfg.aridt +0 -0
- {pyven-96 → pyven-98}/pyven/setuptools.arid +0 -0
- {pyven-96 → pyven-98}/pyven/tests/__init__.py +0 -0
- {pyven-96 → pyven-98}/pyven.egg-info/dependency_links.txt +0 -0
- {pyven-96 → pyven-98}/pyven.egg-info/entry_points.txt +0 -0
- {pyven-96 → pyven-98}/pyven.egg-info/top_level.txt +0 -0
{pyven-96 → pyven-98}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyven
|
|
3
|
-
Version:
|
|
3
|
+
Version: 98
|
|
4
4
|
Summary: Manage development of multiple Python projects
|
|
5
5
|
Home-page: https://pypi.org/project/pyven/
|
|
6
6
|
Author: Homsar
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: homsar@foyono.com
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: aridity>=
|
|
10
|
-
Requires-Dist: diapyr>=
|
|
9
|
+
Requires-Dist: aridity>=77
|
|
10
|
+
Requires-Dist: diapyr>=31
|
|
11
11
|
Requires-Dist: lagoon>=24
|
|
12
12
|
Requires-Dist: pydoc-markdown>=3.3
|
|
13
13
|
Requires-Dist: setuptools>=44.1.1
|
|
@@ -5,12 +5,11 @@ from .projectinfo import ProjectInfo, SimpleInstallDeps
|
|
|
5
5
|
from .util import bgcontainer, Excludes, initapt, pyversiontags, stderr
|
|
6
6
|
from argparse import ArgumentParser
|
|
7
7
|
from aridity.config import ConfigCtrl
|
|
8
|
-
from aridity.model import Text
|
|
9
8
|
from aridity.util import NoSuchPathException, openresource
|
|
10
9
|
from diapyr.util import singleton
|
|
11
10
|
from itertools import chain
|
|
12
11
|
from lagoon import diff
|
|
13
|
-
from lagoon.program import partial
|
|
12
|
+
from lagoon.program import NOEOL, partial
|
|
14
13
|
from setuptools import find_packages
|
|
15
14
|
from shutil import copytree, ignore_patterns
|
|
16
15
|
from tempfile import NamedTemporaryFile
|
|
@@ -92,8 +91,9 @@ class EveryVersion:
|
|
|
92
91
|
|
|
93
92
|
def nose(self):
|
|
94
93
|
upstream_devel_packages = list(self.info.config.upstream.devel.packages)
|
|
94
|
+
upstream_devel_scripts = list(self.info.config.upstream.devel.scripts) if self.userepo else []
|
|
95
95
|
with InstallDeps(self.info, self.siblings, _localrepo() if self.userepo else None) as installdeps:
|
|
96
|
-
installdeps.add('nose-cov', *self.info.config.test.requires)
|
|
96
|
+
installdeps.add('nose-cov', *self.info.config.test.requires) # TODO: Facility to freeze test requires tree.
|
|
97
97
|
for pyversion in self.info.config.pyversions:
|
|
98
98
|
reportsdir = os.path.join(self.info.projectdir, 'var', str(pyversion))
|
|
99
99
|
os.makedirs(reportsdir, exist_ok = True)
|
|
@@ -102,15 +102,22 @@ class EveryVersion:
|
|
|
102
102
|
coveragepath = os.path.join(self.info.projectdir, '.coverage')
|
|
103
103
|
with bgcontainer('-v', "{0}:{0}".format('/var/run/docker.sock'), '--network', 'host', '-v', "%s:%s" % (os.path.abspath(self.info.projectdir), Container.workdir), "python:%s" % pyversiontags[pyversion][0]) as container:
|
|
104
104
|
container = Container(container)
|
|
105
|
+
container.cp(installdeps.workspace, 'installdeps')
|
|
105
106
|
container.inituser()
|
|
106
107
|
if upstream_devel_packages:
|
|
107
108
|
container.initapt()
|
|
108
109
|
for command in ['apt-get', 'update'], ['apt-get', 'install', '-y', 'sudo'] + upstream_devel_packages:
|
|
109
110
|
container.call(command, check = True, root = True)
|
|
110
|
-
|
|
111
|
+
for script in upstream_devel_scripts:
|
|
112
|
+
from lagoon import docker
|
|
113
|
+
dirpath = docker[NOEOL]('exec', container.container, 'mktemp', '-d') # No need to cleanup, will die with container.
|
|
114
|
+
log.debug("In container dir %s run script: %s", dirpath, script)
|
|
115
|
+
docker.exec[print]('-w', dirpath, '-t', container.container, 'sh', '-c', script)
|
|
116
|
+
installdeps.cinvoke(container)
|
|
111
117
|
cpath = lambda p: os.path.relpath(p, self.info.projectdir).replace(os.sep, '/')
|
|
112
118
|
status = container.call([
|
|
113
119
|
'nosetests', '--exe', '-v',
|
|
120
|
+
'--with-doctest', '--doctest-extension', '.md',
|
|
114
121
|
'--with-xunit', '--xunit-file', cpath(xmlpath),
|
|
115
122
|
'--with-cov', '--cov-report', 'term-missing',
|
|
116
123
|
] + 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)
|
|
@@ -124,6 +131,7 @@ except AttributeError:
|
|
|
124
131
|
from collections.abc import Callable
|
|
125
132
|
collections.Callable = Callable''', 'nose'), [
|
|
126
133
|
'--exe', '-v',
|
|
134
|
+
'--with-doctest', '--doctest-extension', '.md',
|
|
127
135
|
'--with-xunit', '--xunit-file', xmlpath,
|
|
128
136
|
'--with-cov', '--cov-report', 'term-missing',
|
|
129
137
|
] + sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []) + self.files.testpaths(xmlpath) + self.noseargs)
|
|
@@ -137,15 +145,6 @@ except AttributeError:
|
|
|
137
145
|
for _, o in resolvable.resolve(scope).resolveditems():
|
|
138
146
|
return o
|
|
139
147
|
raise NoSuchPathException('Empty set.')
|
|
140
|
-
def rmeol(scope, resolvable):
|
|
141
|
-
text = resolvable.resolve(scope).cat()
|
|
142
|
-
if text.endswith('\r\n'):
|
|
143
|
-
n = 2
|
|
144
|
-
elif text.endswith(('\r', '\n')):
|
|
145
|
-
n = 1
|
|
146
|
-
else:
|
|
147
|
-
raise NoSuchPathException('No line terminator to remove.')
|
|
148
|
-
return Text(text[:-n])
|
|
149
148
|
def getpydoc(mainmodules):
|
|
150
149
|
from lagoon import pydoc_markdown
|
|
151
150
|
with TemporaryDirectory() as pydocparent:
|
|
@@ -174,7 +173,6 @@ except AttributeError:
|
|
|
174
173
|
return skip
|
|
175
174
|
config = (-self.info.config).childctrl().node
|
|
176
175
|
config.first = first
|
|
177
|
-
config.rmeol = rmeol
|
|
178
176
|
if self.info.config.readme_verbose:
|
|
179
177
|
config.verbose_blank = ''
|
|
180
178
|
(-config).execute('commands * name = $label()')
|
|
@@ -244,6 +242,10 @@ class Container:
|
|
|
244
242
|
from lagoon import docker
|
|
245
243
|
return docker('exec', '-w', self.workdir, self.container, *([] if root else ['sudo', '-u', 'pyvenuser']) + args, stdout = None, check = check)
|
|
246
244
|
|
|
245
|
+
def cp(self, src, dest):
|
|
246
|
+
from lagoon import docker
|
|
247
|
+
docker.cp[print](src, f"{self.container}:{dest}")
|
|
248
|
+
|
|
247
249
|
def main():
|
|
248
250
|
initlogging()
|
|
249
251
|
parser = ArgumentParser()
|
|
@@ -43,13 +43,14 @@ class Files:
|
|
|
43
43
|
yield path
|
|
44
44
|
|
|
45
45
|
def __init__(self, root):
|
|
46
|
-
srcsuffixes = sum(([s, "%s.aridt" % s] for s in ['.py', '.py3', '.pyx', '.s', '.sh', '.h', '.cpp', '.cxx', '.arid', '.gradle', '.java', '.mk']), [])
|
|
46
|
+
srcsuffixes = sum(([s, "%s.aridt" % s] for s in ['.py', '.py3', '.pyx', '.s', '.sh', '.h', '.cpp', '.cxx', '.arid', '.gradle', '.java', '.mk', '.md']), [])
|
|
47
47
|
self.allsrcpaths = [os.path.join(root, p) for p in self.relpaths(root, srcsuffixes, ['Dockerfile', 'Makefile'])]
|
|
48
|
+
self.docpaths = [p for p in self.allsrcpaths if p.endswith('.md')]
|
|
48
49
|
self.pypaths = [p for p in self.allsrcpaths if p.endswith('.py')]
|
|
49
50
|
self.root = root
|
|
50
51
|
|
|
51
52
|
def testpaths(self, reportpath):
|
|
52
|
-
paths = [p for p in self.pypaths if os.path.basename(p).startswith('test_')]
|
|
53
|
+
paths = [p for p in self.pypaths if os.path.basename(p).startswith('test_')] + self.docpaths
|
|
53
54
|
if os.path.exists(reportpath):
|
|
54
55
|
with open(reportpath) as f:
|
|
55
56
|
doc = dom.parse(f)
|
|
@@ -3,7 +3,7 @@ import glob, json
|
|
|
3
3
|
|
|
4
4
|
policyglobs = [
|
|
5
5
|
'/opt/_internal/*/lib/python3.7/site-packages/auditwheel/policy/policy.json',
|
|
6
|
-
'/opt/_internal/pipx/venvs/auditwheel/lib/python3.
|
|
6
|
+
'/opt/_internal/pipx/venvs/auditwheel/lib/python3.1?/site-packages/auditwheel/policy/manylinux-policy.json',
|
|
7
7
|
]
|
|
8
8
|
syslibs = 'libasound.so.2', 'libjack.so.0', 'libportaudio.so.2'
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'Generate setuptools files for a project.arid project.'
|
|
2
2
|
from .projectinfo import ProjectInfo, Req, SimpleInstallDeps
|
|
3
|
-
from .sourceinfo import SourceInfo
|
|
4
3
|
from argparse import ArgumentParser
|
|
5
4
|
from aridity.config import ConfigCtrl
|
|
5
|
+
from diapyr.util import bfs
|
|
6
6
|
from pkg_resources import resource_filename
|
|
7
7
|
from tempfile import mkdtemp
|
|
8
8
|
from venvpool import initlogging, Pool
|
|
@@ -39,22 +39,20 @@ console_scripts := $list()
|
|
|
39
39
|
cc.w.author_email = info.config.author_email if release else None
|
|
40
40
|
for m in info.py_modules():
|
|
41
41
|
cc.w.py_modules += m
|
|
42
|
-
for r in info.allrequires
|
|
42
|
+
for r in info.allrequires:
|
|
43
43
|
cc.w.install_requires += r
|
|
44
44
|
for s in info.console_scripts():
|
|
45
45
|
cc.w.console_scripts += s
|
|
46
46
|
cc.w.universal = int({2, 3} <= set(info.config.pyversions))
|
|
47
47
|
# XXX: Use soak to generate these?
|
|
48
48
|
tasks = [
|
|
49
|
-
['setup.py', 'setup
|
|
49
|
+
['setup.py', 'setup.py.aridt', 'pystr'],
|
|
50
50
|
['setup.cfg', 'setup.cfg.aridt', 'void'],
|
|
51
51
|
]
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
cc.w.build.requires += name
|
|
57
|
-
if seen != {'setuptools', 'wheel'}:
|
|
52
|
+
@bfs(info.allbuildrequires)
|
|
53
|
+
def proc(bfsinfo, name):
|
|
54
|
+
cc.w.build_requires += name
|
|
55
|
+
if proc.donekeys != {'setuptools', 'wheel'}:
|
|
58
56
|
tasks.append(['pyproject.toml', 'pyproject.toml.aridt', 'tomlquote'])
|
|
59
57
|
for name, template, quote in tasks:
|
|
60
58
|
cc.printf('" = $(%s)', quote)
|
|
@@ -62,17 +60,6 @@ console_scripts := $list()
|
|
|
62
60
|
resource_filename(__name__, template), # TODO LATER: Make aridity get the resource.
|
|
63
61
|
os.path.abspath(os.path.join(info.projectdir, name)))
|
|
64
62
|
|
|
65
|
-
def allbuildrequires(info):
|
|
66
|
-
yield 'setuptools'
|
|
67
|
-
yield 'wheel'
|
|
68
|
-
reqs = set()
|
|
69
|
-
for p in SourceInfo(info.projectdir).extpaths:
|
|
70
|
-
reqs.update(p.buildrequires())
|
|
71
|
-
for r in sorted(reqs):
|
|
72
|
-
yield r
|
|
73
|
-
for r in info.config.build.requires:
|
|
74
|
-
yield r
|
|
75
|
-
|
|
76
63
|
def main():
|
|
77
64
|
initlogging()
|
|
78
65
|
parser = ArgumentParser()
|
|
@@ -87,11 +74,10 @@ def main():
|
|
|
87
74
|
def setupcommand(info, pyversion, transient, *command):
|
|
88
75
|
def setup(absexecutable):
|
|
89
76
|
subprocess.check_call([absexecutable, 'setup.py'] + list(command), cwd = info.projectdir)
|
|
90
|
-
|
|
91
|
-
if {'setuptools', 'wheel'} == set(buildreqs) and sys.version_info.major == pyversion:
|
|
77
|
+
if {'setuptools', 'wheel'} == set(info.allbuildrequires) and sys.version_info.major == pyversion:
|
|
92
78
|
setup(sys.executable)
|
|
93
79
|
else:
|
|
94
|
-
with Pool(pyversion).readonlyortransient[transient](SimpleInstallDeps(
|
|
80
|
+
with Pool(pyversion).readonlyortransient[transient](SimpleInstallDeps(info.allbuildrequires)) as venv:
|
|
95
81
|
setup(venv.programpath('python'))
|
|
96
82
|
|
|
97
83
|
class VolatileReq:
|
|
@@ -146,13 +132,12 @@ class InstallDeps:
|
|
|
146
132
|
continue
|
|
147
133
|
if root: # Otherwise pip will handle it.
|
|
148
134
|
pypireqs.append(r.reqstr)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
infos = nextinfos
|
|
135
|
+
@bfs([(self.info, True)])
|
|
136
|
+
class Proc:
|
|
137
|
+
def newdepth(self):
|
|
138
|
+
log.debug("Examine deps of: %s", ', '.join(i.config.name for i, _ in self.currentkeys))
|
|
139
|
+
def process(self, t):
|
|
140
|
+
return adddeps(*t)
|
|
156
141
|
for i in volatileprojects.values(): # Assume editables already pipified.
|
|
157
142
|
pipify(i)
|
|
158
143
|
self.localreqs = [i.projectdir for i in editableprojects.values()]
|
|
@@ -166,6 +151,9 @@ class InstallDeps:
|
|
|
166
151
|
def invoke(self, venv):
|
|
167
152
|
venv.install([i.projectdir for i in self.volatileprojects] + [r.reqstr for r in self.fetchreqs])
|
|
168
153
|
|
|
154
|
+
def cinvoke(self, container):
|
|
155
|
+
container.install(["/installdeps/%s" % os.path.relpath(i.projectdir, self.workspace).replace(os.sep, '/') for i in self.volatileprojects] + [r.reqstr for r in self.fetchreqs])
|
|
156
|
+
|
|
169
157
|
def __exit__(self, *exc_info):
|
|
170
158
|
shutil.rmtree(self.workspace)
|
|
171
159
|
|
|
@@ -4,12 +4,14 @@ requires := $list()
|
|
|
4
4
|
pyversions := $list()
|
|
5
5
|
proprietary = false
|
|
6
6
|
resource types := $list(pxd pyx pyxbld arid aridt)
|
|
7
|
-
build requires
|
|
7
|
+
build requires +=
|
|
8
|
+
setuptools
|
|
9
|
+
wheel
|
|
8
10
|
licenses := $list(GPL)
|
|
9
11
|
MIT path = LICENSE
|
|
10
12
|
licheck
|
|
11
13
|
enabled = $¬$(proprietary)
|
|
12
|
-
exclude globs
|
|
14
|
+
exclude globs += **/*.md
|
|
13
15
|
flakes exclude globs := $list()
|
|
14
16
|
pypi
|
|
15
17
|
account = $(None)
|
|
@@ -22,10 +24,13 @@ devel
|
|
|
22
24
|
packages := $list()
|
|
23
25
|
scripts := $list()
|
|
24
26
|
warmups := $list()
|
|
25
|
-
upstream devel
|
|
27
|
+
upstream devel
|
|
28
|
+
packages := $list()
|
|
29
|
+
scripts := $list()
|
|
26
30
|
test requires := $list()
|
|
27
31
|
tagline = $(void)
|
|
28
|
-
|
|
32
|
+
cython_build_version = 3.0.11
|
|
33
|
+
numpy_build_version = 2.0.2
|
|
29
34
|
pydoc_enabled = true
|
|
30
35
|
readme_verbose = $(github participant)
|
|
31
36
|
internal_module := $list()
|
|
@@ -6,7 +6,6 @@ from aridity.model import Entry, Resource
|
|
|
6
6
|
from aridity.util import openresource
|
|
7
7
|
from inspect import getsource
|
|
8
8
|
from pkg_resources import parse_requirements
|
|
9
|
-
from pkg_resources.extern.packaging.markers import UndefinedEnvironmentName
|
|
10
9
|
from setuphacks import getsetupkwargs
|
|
11
10
|
from venvpool import ParsedRequires, TemporaryDirectory
|
|
12
11
|
import logging, os, re, subprocess, venvpool
|
|
@@ -89,8 +88,9 @@ class Req:
|
|
|
89
88
|
if marker is None or marker.evaluate():
|
|
90
89
|
assert not self.parsed.extras # Not supported.
|
|
91
90
|
return True
|
|
92
|
-
except
|
|
93
|
-
|
|
91
|
+
except ValueError as e:
|
|
92
|
+
if 'UndefinedEnvironmentName' != type(e).__name__:
|
|
93
|
+
raise
|
|
94
94
|
|
|
95
95
|
def keyversion(self):
|
|
96
96
|
s, = self.specifierset
|
|
@@ -129,10 +129,12 @@ class ProjectInfo:
|
|
|
129
129
|
return info
|
|
130
130
|
|
|
131
131
|
def __init__(self, projectdir, infopathorstream):
|
|
132
|
-
|
|
133
|
-
Resource(__name__, 'projectinfo.arid', 'utf-8').source(
|
|
134
|
-
|
|
135
|
-
self.
|
|
132
|
+
cc = ConfigCtrl()
|
|
133
|
+
Resource(__name__, 'projectinfo.arid', 'utf-8').source(cc.scope(), Entry([]))
|
|
134
|
+
cc.load(infopathorstream)
|
|
135
|
+
self.allbuildrequires = list(cc.r.build.requires)
|
|
136
|
+
self.allrequires = list(cc.r.requires)
|
|
137
|
+
self.config = cc.node
|
|
136
138
|
self.projectdir = projectdir
|
|
137
139
|
|
|
138
140
|
def mitpath(self):
|
|
@@ -141,11 +143,8 @@ class ProjectInfo:
|
|
|
141
143
|
def contextworkspace(self):
|
|
142
144
|
return os.path.join(self.projectdir, '..')
|
|
143
145
|
|
|
144
|
-
def allrequires(self):
|
|
145
|
-
return list(self.config.requires)
|
|
146
|
-
|
|
147
146
|
def parsedrequires(self):
|
|
148
|
-
return Req.parselines(self.allrequires
|
|
147
|
+
return Req.parselines(self.allrequires)
|
|
149
148
|
|
|
150
149
|
def localrequires(self):
|
|
151
150
|
return [r.namepart for r in self.parsedrequires() if r.isproject(self)]
|
|
@@ -210,8 +209,7 @@ def setuptoolsinfo(setuppath):
|
|
|
210
209
|
setupkwargs = getsetupkwargs(setuppath, ['name', 'install_requires', 'entry_points'])
|
|
211
210
|
if 'name' in setupkwargs:
|
|
212
211
|
info.config.name = setupkwargs['name']
|
|
213
|
-
|
|
214
|
-
(-info.config).printf("requires += %s", r)
|
|
212
|
+
info.allrequires.extend(setupkwargs.get('install_requires', []))
|
|
215
213
|
console_scripts = setupkwargs.get('entry_points', {}).get('console_scripts')
|
|
216
214
|
info.console_scripts = lambda: console_scripts
|
|
217
215
|
return info
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'Release project to PyPI, with manylinux wheels as needed.'
|
|
2
2
|
from .checks import EveryVersion
|
|
3
|
-
from .pipify import
|
|
3
|
+
from .pipify import InstallDeps, pipify
|
|
4
4
|
from .projectinfo import ProjectInfo, SimpleInstallDeps
|
|
5
5
|
from .sourceinfo import SourceInfo
|
|
6
6
|
from .util import bgcontainer
|
|
@@ -30,11 +30,10 @@ def _images():
|
|
|
30
30
|
)
|
|
31
31
|
archmatch = re.compile("_(%s)$" % '|'.join(map(re.escape, archlookup))).search
|
|
32
32
|
images = {
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'manylinux2014_i686': '2020-08-29-f97fd86',
|
|
33
|
+
'manylinux_2_34_x86_64': '2024-11-23-da4547b',
|
|
34
|
+
'manylinux_2_28_x86_64': '2024-11-30-fa0d298',
|
|
35
|
+
'manylinux2014_x86_64': '2024-11-24-a3012f3',
|
|
36
|
+
'manylinux2014_i686': '2024-11-23-da4547b',
|
|
38
37
|
}
|
|
39
38
|
for plat, imagetag in images.items():
|
|
40
39
|
yield Image(imagetag, plat, archlookup[archmatch(plat).group(1)])
|
|
@@ -130,7 +129,7 @@ def _warmups(info):
|
|
|
130
129
|
venv.run('check_call', ['.'] + installdeps.localreqs, os.path.basename(script.name)[:-len(dotpy)], [], cwd = info.projectdir)
|
|
131
130
|
|
|
132
131
|
def _runsetup(info, commands):
|
|
133
|
-
with Pool(next(iter(info.config.pyversions))).readonly(SimpleInstallDeps(allbuildrequires
|
|
132
|
+
with Pool(next(iter(info.config.pyversions))).readonly(SimpleInstallDeps(info.allbuildrequires)) as venv: # TODO: Newer setuptools for PEP 625.
|
|
134
133
|
venv.run('check_call', ['.'], 'setup', commands, cwd = info.projectdir) # XXX: Should venvpool automatically include current dir?
|
|
135
134
|
|
|
136
135
|
def release(config, srcgit, info):
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
from setuptools import
|
|
1
|
+
from setuptools import setup
|
|
2
2
|
|
|
3
3
|
def long_description():
|
|
4
4
|
with open('README.md') as f:
|
|
5
5
|
return f.read()
|
|
6
6
|
|
|
7
|
+
$readfile$./(sourceinfo.py)
|
|
8
|
+
sourceinfo = SourceInfo('.')
|
|
7
9
|
setup(
|
|
8
10
|
name = $"$(name),
|
|
9
11
|
version = $"$(version),
|
|
@@ -13,9 +15,9 @@ setup(
|
|
|
13
15
|
url = $"$(url),
|
|
14
16
|
author = $"$(author),
|
|
15
17
|
author_email = $"$(author_email),
|
|
16
|
-
packages = find_packages(),
|
|
17
18
|
py_modules = [$join($map($(py_modules) $"$()) $.(, ))],
|
|
18
19
|
install_requires = [$join($map($(install_requires) $"$()) $.(, ))],
|
|
19
20
|
package_data = {'': [$join($map($(resource types) $"(*.$())) $.(, ))]},
|
|
20
21
|
entry_points = {'console_scripts': [$join($map($(console_scripts) $"$()) $.(, ))]},
|
|
22
|
+
**sourceinfo.setup_kwargs(),
|
|
21
23
|
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class SourceInfo:
|
|
2
|
+
|
|
3
|
+
class PYXPath:
|
|
4
|
+
|
|
5
|
+
def __init__(self, module, path):
|
|
6
|
+
self.module = module
|
|
7
|
+
self.path = path
|
|
8
|
+
|
|
9
|
+
def make_ext(self):
|
|
10
|
+
g = {}
|
|
11
|
+
with open("%sbld" % self.path) as f: # Assume project root.
|
|
12
|
+
exec(f.read(), g)
|
|
13
|
+
return g['make_ext'](self.module, self.path)
|
|
14
|
+
|
|
15
|
+
def __init__(self, rootdir):
|
|
16
|
+
def addextpaths(dirpath, moduleprefix, suffix = '.pyx'):
|
|
17
|
+
for name in sorted(os.listdir(os.path.join(rootdir, dirpath))):
|
|
18
|
+
if name.endswith(suffix):
|
|
19
|
+
module = "%s%s" % (moduleprefix, name[:-len(suffix)])
|
|
20
|
+
if module not in extpaths:
|
|
21
|
+
extpaths[module] = self.PYXPath(module, os.path.join(dirpath, name))
|
|
22
|
+
from setuptools import find_packages
|
|
23
|
+
import os
|
|
24
|
+
self.packages = find_packages(rootdir)
|
|
25
|
+
extpaths = {}
|
|
26
|
+
addextpaths('.', '')
|
|
27
|
+
for package in self.packages:
|
|
28
|
+
addextpaths(package.replace('.', os.sep), "%s." % package)
|
|
29
|
+
self.extpaths = extpaths.values()
|
|
30
|
+
|
|
31
|
+
def setup_kwargs(self):
|
|
32
|
+
kwargs = dict(packages = self.packages)
|
|
33
|
+
if self.extpaths:
|
|
34
|
+
from Cython.Build import cythonize
|
|
35
|
+
kwargs['ext_modules'] = cythonize([path.make_ext() for path in self.extpaths])
|
|
36
|
+
return kwargs
|
|
@@ -10,7 +10,7 @@ def main():
|
|
|
10
10
|
root, = subprocess.check_output(['git', 'rev-parse', '--show-toplevel']).decode().splitlines()
|
|
11
11
|
agcommand = ['ag', '--noheading', '--nobreak']
|
|
12
12
|
# XXX: Integrate with declared project resource types?
|
|
13
|
-
paths = list(Files.relpaths(root, ['.py', '.pyx', '.h', '.cpp', '.ui', '.java', '.kt', '.c', '.s', '.sh', '.arid', '.aridt', '.gradle', '.java', '.mk'], ['Dockerfile', 'Makefile']))
|
|
13
|
+
paths = list(Files.relpaths(root, ['.py', '.pyx', '.h', '.cpp', '.ui', '.java', '.kt', '.c', '.s', '.sh', '.arid', '.aridt', '.gradle', '.java', '.mk', '.js'], ['Dockerfile', 'Makefile']))
|
|
14
14
|
for tag in ['XX''X', 'TO''DO', 'FIX''ME'][config.q:]:
|
|
15
15
|
subprocess.call(agcommand + [tag + ' LATER'] + paths, cwd = root)
|
|
16
16
|
subprocess.call(agcommand + [tag + '(?! LATER)'] + paths, cwd = root)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'Check last release can be installed from PyPI and its tests still pass, for use by CI.'
|
|
2
2
|
from .checks import EveryVersion
|
|
3
|
-
from .pipify import pipify
|
|
4
3
|
from .projectinfo import ProjectInfo
|
|
5
4
|
from .util import bgcontainer, initapt, pyversiontags
|
|
6
5
|
from lagoon import git
|
|
@@ -34,9 +33,7 @@ def main():
|
|
|
34
33
|
containerexec('apt-get', 'install', '-y', *upstream_devel_packages)
|
|
35
34
|
containerexec('pip', 'install', req)
|
|
36
35
|
git.checkout("v%s" % version, stdout = None)
|
|
37
|
-
|
|
38
|
-
pipify(info)
|
|
39
|
-
EveryVersion(info, False, False, [], False, True).nose()
|
|
36
|
+
EveryVersion(ProjectInfo.seek('.'), False, False, [], True, True).nose()
|
|
40
37
|
|
|
41
38
|
if '__main__' == __name__:
|
|
42
39
|
main()
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyven
|
|
3
|
-
Version:
|
|
3
|
+
Version: 98
|
|
4
4
|
Summary: Manage development of multiple Python projects
|
|
5
5
|
Home-page: https://pypi.org/project/pyven/
|
|
6
6
|
Author: Homsar
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: homsar@foyono.com
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: aridity>=
|
|
10
|
-
Requires-Dist: diapyr>=
|
|
9
|
+
Requires-Dist: aridity>=77
|
|
10
|
+
Requires-Dist: diapyr>=31
|
|
11
11
|
Requires-Dist: lagoon>=24
|
|
12
12
|
Requires-Dist: pydoc-markdown>=3.3
|
|
13
13
|
Requires-Dist: setuptools>=44.1.1
|
|
@@ -5,7 +5,6 @@ pyven/README.md.aridt
|
|
|
5
5
|
pyven/__init__.py
|
|
6
6
|
pyven/bdist.py
|
|
7
7
|
pyven/checks.py
|
|
8
|
-
pyven/cythonize.py
|
|
9
8
|
pyven/divcheck.py
|
|
10
9
|
pyven/drmake.py
|
|
11
10
|
pyven/execcheck.py
|
|
@@ -23,7 +22,6 @@ pyven/projectinfo.py
|
|
|
23
22
|
pyven/pyproject.toml.aridt
|
|
24
23
|
pyven/release.arid
|
|
25
24
|
pyven/release.py
|
|
26
|
-
pyven/setup-native.py.aridt
|
|
27
25
|
pyven/setup.cfg.aridt
|
|
28
26
|
pyven/setup.py.aridt
|
|
29
27
|
pyven/setuptools.arid
|
{pyven-96 → pyven-98}/setup.cfg
RENAMED
pyven-98/setup.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
|
|
3
|
+
def long_description():
|
|
4
|
+
with open('README.md') as f:
|
|
5
|
+
return f.read()
|
|
6
|
+
|
|
7
|
+
class SourceInfo:
|
|
8
|
+
|
|
9
|
+
class PYXPath:
|
|
10
|
+
|
|
11
|
+
def __init__(self, module, path):
|
|
12
|
+
self.module = module
|
|
13
|
+
self.path = path
|
|
14
|
+
|
|
15
|
+
def make_ext(self):
|
|
16
|
+
g = {}
|
|
17
|
+
with open("%sbld" % self.path) as f: # Assume project root.
|
|
18
|
+
exec(f.read(), g)
|
|
19
|
+
return g['make_ext'](self.module, self.path)
|
|
20
|
+
|
|
21
|
+
def __init__(self, rootdir):
|
|
22
|
+
def addextpaths(dirpath, moduleprefix, suffix = '.pyx'):
|
|
23
|
+
for name in sorted(os.listdir(os.path.join(rootdir, dirpath))):
|
|
24
|
+
if name.endswith(suffix):
|
|
25
|
+
module = "%s%s" % (moduleprefix, name[:-len(suffix)])
|
|
26
|
+
if module not in extpaths:
|
|
27
|
+
extpaths[module] = self.PYXPath(module, os.path.join(dirpath, name))
|
|
28
|
+
from setuptools import find_packages
|
|
29
|
+
import os
|
|
30
|
+
self.packages = find_packages(rootdir)
|
|
31
|
+
extpaths = {}
|
|
32
|
+
addextpaths('.', '')
|
|
33
|
+
for package in self.packages:
|
|
34
|
+
addextpaths(package.replace('.', os.sep), "%s." % package)
|
|
35
|
+
self.extpaths = extpaths.values()
|
|
36
|
+
|
|
37
|
+
def setup_kwargs(self):
|
|
38
|
+
kwargs = dict(packages = self.packages)
|
|
39
|
+
if self.extpaths:
|
|
40
|
+
from Cython.Build import cythonize
|
|
41
|
+
kwargs['ext_modules'] = cythonize([path.make_ext() for path in self.extpaths])
|
|
42
|
+
return kwargs
|
|
43
|
+
|
|
44
|
+
sourceinfo = SourceInfo('.')
|
|
45
|
+
setup(
|
|
46
|
+
name = 'pyven',
|
|
47
|
+
version = '98',
|
|
48
|
+
description = 'Manage development of multiple Python projects',
|
|
49
|
+
long_description = long_description(),
|
|
50
|
+
long_description_content_type = 'text/markdown',
|
|
51
|
+
url = 'https://pypi.org/project/pyven/',
|
|
52
|
+
author = 'Homsar',
|
|
53
|
+
author_email = 'homsar@foyono.com',
|
|
54
|
+
py_modules = [],
|
|
55
|
+
install_requires = ['aridity>=77', 'diapyr>=31', 'lagoon>=24', 'pydoc-markdown>=3.3', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=14'],
|
|
56
|
+
package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
|
|
57
|
+
entry_points = {'console_scripts': ['drmake=pyven.drmake:main', 'launch=pyven.launch:main', '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
|
+
**sourceinfo.setup_kwargs(),
|
|
59
|
+
)
|
pyven-96/pyven/cythonize.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
def lazy(clazz, init, *initbefore):
|
|
2
|
-
from threading import Lock
|
|
3
|
-
initlock = Lock()
|
|
4
|
-
init = [init]
|
|
5
|
-
def overridefactory(name):
|
|
6
|
-
orig = getattr(clazz, name)
|
|
7
|
-
def override(*args, **kwargs):
|
|
8
|
-
with initlock:
|
|
9
|
-
if init:
|
|
10
|
-
init[0](obj)
|
|
11
|
-
del init[:]
|
|
12
|
-
return orig(*args, **kwargs)
|
|
13
|
-
return override
|
|
14
|
-
Lazy = type('Lazy', (clazz, object), {name: overridefactory(name) for name in initbefore})
|
|
15
|
-
obj = Lazy()
|
|
16
|
-
return obj
|
|
17
|
-
|
|
18
|
-
# FIXME: The idea was to defer anything Cython/numpy to pyximport time, but this doesn't achieve that.
|
|
19
|
-
def cythonize(extensions):
|
|
20
|
-
def init(ext_modules):
|
|
21
|
-
ordinary = []
|
|
22
|
-
cythonizable = []
|
|
23
|
-
for e in extensions:
|
|
24
|
-
(cythonizable if any(s.endswith('.pyx') for s in e.sources) else ordinary).append(e)
|
|
25
|
-
if cythonizable:
|
|
26
|
-
from Cython.Build import cythonize
|
|
27
|
-
ordinary += cythonize(cythonizable)
|
|
28
|
-
ext_modules[:] = ordinary
|
|
29
|
-
return lazy(list, init, '__getitem__', '__iter__', '__len__')
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
from setuptools import setup
|
|
2
|
-
|
|
3
|
-
def long_description():
|
|
4
|
-
with open('README.md') as f:
|
|
5
|
-
return f.read()
|
|
6
|
-
|
|
7
|
-
$readfile$./(sourceinfo.py)
|
|
8
|
-
$readfile$./(cythonize.py)
|
|
9
|
-
sourceinfo = SourceInfo('.')
|
|
10
|
-
setup(
|
|
11
|
-
name = $"$(name),
|
|
12
|
-
version = $"$(version),
|
|
13
|
-
description = $"$(tagline),
|
|
14
|
-
long_description = $(long_description),
|
|
15
|
-
long_description_content_type = 'text/markdown',
|
|
16
|
-
url = $"$(url),
|
|
17
|
-
author = $"$(author),
|
|
18
|
-
author_email = $"$(author_email),
|
|
19
|
-
packages = sourceinfo.packages,
|
|
20
|
-
py_modules = [$join($map($(py_modules) $"$()) $.(, ))],
|
|
21
|
-
install_requires = [$join($map($(install_requires) $"$()) $.(, ))],
|
|
22
|
-
package_data = {'': [$join($map($(resource types) $"(*.$())) $.(, ))]},
|
|
23
|
-
entry_points = {'console_scripts': [$join($map($(console_scripts) $"$()) $.(, ))]},
|
|
24
|
-
ext_modules = cythonize([path.make_ext() for path in sourceinfo.extpaths]),
|
|
25
|
-
)
|
pyven-96/pyven/sourceinfo.py
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
class SourceInfo:
|
|
2
|
-
|
|
3
|
-
class PYXPath:
|
|
4
|
-
|
|
5
|
-
suffixes = '.pyx', '.c'
|
|
6
|
-
|
|
7
|
-
def __init__(self, module, path):
|
|
8
|
-
self.module = module
|
|
9
|
-
self.path = path
|
|
10
|
-
|
|
11
|
-
def buildrequires(self):
|
|
12
|
-
if self.path.endswith('.pyx'):
|
|
13
|
-
yield 'Cython<3'
|
|
14
|
-
|
|
15
|
-
def make_ext(self):
|
|
16
|
-
g = {}
|
|
17
|
-
with open(self.path + 'bld') as f: # Assume project root.
|
|
18
|
-
exec(f.read(), g)
|
|
19
|
-
return g['make_ext'](self.module, self.path)
|
|
20
|
-
|
|
21
|
-
def __init__(self, rootdir):
|
|
22
|
-
import os, setuptools, subprocess
|
|
23
|
-
self.packages = setuptools.find_packages(rootdir)
|
|
24
|
-
extpaths = {}
|
|
25
|
-
def addextpaths(dirpath, moduleprefix):
|
|
26
|
-
names = sorted(os.listdir(os.path.join(rootdir, dirpath)))
|
|
27
|
-
for suffix in self.PYXPath.suffixes:
|
|
28
|
-
for name in names:
|
|
29
|
-
if name.endswith(suffix):
|
|
30
|
-
module = "%s%s" % (moduleprefix, name[:-len(suffix)])
|
|
31
|
-
if module not in extpaths:
|
|
32
|
-
extpaths[module] = self.PYXPath(module, os.path.join(dirpath, name))
|
|
33
|
-
addextpaths('.', '')
|
|
34
|
-
for package in self.packages:
|
|
35
|
-
addextpaths(package.replace('.', os.sep), "%s." % package)
|
|
36
|
-
extpaths = extpaths.values()
|
|
37
|
-
if extpaths and os.path.isdir(os.path.join(rootdir, '.git')): # We could be an unpacked sdist.
|
|
38
|
-
check_ignore = subprocess.Popen(['git', 'check-ignore'] + [p.path for p in extpaths], cwd = rootdir, stdout = subprocess.PIPE)
|
|
39
|
-
ignoredpaths = set(check_ignore.communicate()[0].decode().splitlines())
|
|
40
|
-
assert check_ignore.wait() in [0, 1]
|
|
41
|
-
self.extpaths = [path for path in extpaths if path.path not in ignoredpaths]
|
|
42
|
-
else:
|
|
43
|
-
self.extpaths = extpaths
|
pyven-96/setup.py
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
from setuptools import find_packages, setup
|
|
2
|
-
|
|
3
|
-
def long_description():
|
|
4
|
-
with open('README.md') as f:
|
|
5
|
-
return f.read()
|
|
6
|
-
|
|
7
|
-
setup(
|
|
8
|
-
name = 'pyven',
|
|
9
|
-
version = '96',
|
|
10
|
-
description = 'Manage development of multiple Python projects',
|
|
11
|
-
long_description = long_description(),
|
|
12
|
-
long_description_content_type = 'text/markdown',
|
|
13
|
-
url = 'https://pypi.org/project/pyven/',
|
|
14
|
-
author = 'Homsar',
|
|
15
|
-
author_email = 'shrovis@foyono.com',
|
|
16
|
-
packages = find_packages(),
|
|
17
|
-
py_modules = [],
|
|
18
|
-
install_requires = ['aridity>=67', 'diapyr>=27', 'lagoon>=24', 'pydoc-markdown>=3.3', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=14'],
|
|
19
|
-
package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
|
|
20
|
-
entry_points = {'console_scripts': ['drmake=pyven.drmake:main', 'launch=pyven.launch:main', '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']},
|
|
21
|
-
)
|
{pyven-96 → pyven-98}/README.md
RENAMED
|
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
|