pyven 97__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.
Files changed (44) hide show
  1. {pyven-97 → pyven-98}/PKG-INFO +3 -3
  2. {pyven-97 → pyven-98}/pyven/checks.py +16 -3
  3. {pyven-97 → pyven-98}/pyven/files.py +3 -2
  4. {pyven-97 → pyven-98}/pyven/patchpolicy.py +1 -1
  5. {pyven-97 → pyven-98}/pyven/pipify.py +18 -30
  6. {pyven-97 → pyven-98}/pyven/projectinfo.arid +9 -4
  7. {pyven-97 → pyven-98}/pyven/projectinfo.py +8 -10
  8. pyven-98/pyven/pyproject.toml.aridt +2 -0
  9. {pyven-97 → pyven-98}/pyven/release.py +6 -7
  10. {pyven-97 → pyven-98}/pyven/setup.py.aridt +4 -2
  11. pyven-98/pyven/sourceinfo.py +36 -0
  12. {pyven-97 → pyven-98}/pyven/tryinstall.py +1 -4
  13. {pyven-97 → pyven-98}/pyven/util.py +1 -1
  14. {pyven-97 → pyven-98}/pyven.egg-info/PKG-INFO +3 -3
  15. {pyven-97 → pyven-98}/pyven.egg-info/SOURCES.txt +0 -2
  16. {pyven-97 → pyven-98}/pyven.egg-info/requires.txt +1 -1
  17. {pyven-97 → pyven-98}/setup.cfg +1 -1
  18. pyven-98/setup.py +59 -0
  19. pyven-97/pyven/cythonize.py +0 -29
  20. pyven-97/pyven/pyproject.toml.aridt +0 -2
  21. pyven-97/pyven/setup-native.py.aridt +0 -25
  22. pyven-97/pyven/sourceinfo.py +0 -43
  23. pyven-97/setup.py +0 -21
  24. {pyven-97 → pyven-98}/README.md +0 -0
  25. {pyven-97 → pyven-98}/pyven/README.md.aridt +0 -0
  26. {pyven-97 → pyven-98}/pyven/__init__.py +0 -0
  27. {pyven-97 → pyven-98}/pyven/bdist.py +0 -0
  28. {pyven-97 → pyven-98}/pyven/divcheck.py +0 -0
  29. {pyven-97 → pyven-98}/pyven/drmake.py +0 -0
  30. {pyven-97 → pyven-98}/pyven/execcheck.py +0 -0
  31. {pyven-97 → pyven-98}/pyven/functions.py +0 -0
  32. {pyven-97 → pyven-98}/pyven/launch.py +0 -0
  33. {pyven-97 → pyven-98}/pyven/licheck.py +0 -0
  34. {pyven-97 → pyven-98}/pyven/mainmodules.py +0 -0
  35. {pyven-97 → pyven-98}/pyven/minreqs.py +0 -0
  36. {pyven-97 → pyven-98}/pyven/nlcheck.py +0 -0
  37. {pyven-97 → pyven-98}/pyven/release.arid +0 -0
  38. {pyven-97 → pyven-98}/pyven/setup.cfg.aridt +0 -0
  39. {pyven-97 → pyven-98}/pyven/setuptools.arid +0 -0
  40. {pyven-97 → pyven-98}/pyven/tasks.py +0 -0
  41. {pyven-97 → pyven-98}/pyven/tests/__init__.py +0 -0
  42. {pyven-97 → pyven-98}/pyven.egg-info/dependency_links.txt +0 -0
  43. {pyven-97 → pyven-98}/pyven.egg-info/entry_points.txt +0 -0
  44. {pyven-97 → pyven-98}/pyven.egg-info/top_level.txt +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 97
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: shrovis@foyono.com
7
+ Author-email: homsar@foyono.com
8
8
  Description-Content-Type: text/markdown
9
9
  Requires-Dist: aridity>=77
10
- Requires-Dist: diapyr>=27
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
@@ -9,7 +9,7 @@ from aridity.util import NoSuchPathException, openresource
9
9
  from diapyr.util import singleton
10
10
  from itertools import chain
11
11
  from lagoon import diff
12
- from lagoon.program import partial
12
+ from lagoon.program import NOEOL, partial
13
13
  from setuptools import find_packages
14
14
  from shutil import copytree, ignore_patterns
15
15
  from tempfile import NamedTemporaryFile
@@ -91,8 +91,9 @@ class EveryVersion:
91
91
 
92
92
  def nose(self):
93
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 []
94
95
  with InstallDeps(self.info, self.siblings, _localrepo() if self.userepo else None) as installdeps:
95
- 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.
96
97
  for pyversion in self.info.config.pyversions:
97
98
  reportsdir = os.path.join(self.info.projectdir, 'var', str(pyversion))
98
99
  os.makedirs(reportsdir, exist_ok = True)
@@ -101,15 +102,22 @@ class EveryVersion:
101
102
  coveragepath = os.path.join(self.info.projectdir, '.coverage')
102
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:
103
104
  container = Container(container)
105
+ container.cp(installdeps.workspace, 'installdeps')
104
106
  container.inituser()
105
107
  if upstream_devel_packages:
106
108
  container.initapt()
107
109
  for command in ['apt-get', 'update'], ['apt-get', 'install', '-y', 'sudo'] + upstream_devel_packages:
108
110
  container.call(command, check = True, root = True)
109
- installdeps.invoke(container)
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)
110
117
  cpath = lambda p: os.path.relpath(p, self.info.projectdir).replace(os.sep, '/')
111
118
  status = container.call([
112
119
  'nosetests', '--exe', '-v',
120
+ '--with-doctest', '--doctest-extension', '.md',
113
121
  '--with-xunit', '--xunit-file', cpath(xmlpath),
114
122
  '--with-cov', '--cov-report', 'term-missing',
115
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)
@@ -123,6 +131,7 @@ except AttributeError:
123
131
  from collections.abc import Callable
124
132
  collections.Callable = Callable''', 'nose'), [
125
133
  '--exe', '-v',
134
+ '--with-doctest', '--doctest-extension', '.md',
126
135
  '--with-xunit', '--xunit-file', xmlpath,
127
136
  '--with-cov', '--cov-report', 'term-missing',
128
137
  ] + sum((['--cov', p] for p in chain(find_packages(self.info.projectdir), self.info.py_modules())), []) + self.files.testpaths(xmlpath) + self.noseargs)
@@ -233,6 +242,10 @@ class Container:
233
242
  from lagoon import docker
234
243
  return docker('exec', '-w', self.workdir, self.container, *([] if root else ['sudo', '-u', 'pyvenuser']) + args, stdout = None, check = check)
235
244
 
245
+ def cp(self, src, dest):
246
+ from lagoon import docker
247
+ docker.cp[print](src, f"{self.container}:{dest}")
248
+
236
249
  def main():
237
250
  initlogging()
238
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.10/site-packages/auditwheel/policy/manylinux-policy.json',
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-native.py.aridt' if info.config.native else 'setup.py.aridt', 'pystr'],
49
+ ['setup.py', 'setup.py.aridt', 'pystr'],
50
50
  ['setup.cfg', 'setup.cfg.aridt', 'void'],
51
51
  ]
52
- seen = set()
53
- for name in allbuildrequires(info):
54
- if name not in seen:
55
- seen.add(name)
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
- buildreqs = list(allbuildrequires(info))
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(buildreqs)) as venv:
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
- infos = [(self.info, True)]
150
- while infos:
151
- log.debug("Examine deps of: %s", ', '.join(i.config.name for i, _ in infos))
152
- nextinfos = []
153
- for i, isroot in infos:
154
- nextinfos.extend(adddeps(i, isroot))
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 := $list()
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 := $list()
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 packages := $list()
27
+ upstream devel
28
+ packages := $list()
29
+ scripts := $list()
26
30
  test requires := $list()
27
31
  tagline = $(void)
28
- native = false
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()
@@ -129,10 +129,12 @@ class ProjectInfo:
129
129
  return info
130
130
 
131
131
  def __init__(self, projectdir, infopathorstream):
132
- config = ConfigCtrl()
133
- Resource(__name__, 'projectinfo.arid', 'utf-8').source(config.scope(), Entry([]))
134
- config.load(infopathorstream)
135
- self.config = config.node
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
- for r in setupkwargs.get('install_requires', []):
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
@@ -0,0 +1,2 @@
1
+ [build-system]
2
+ requires = [$join($map($(build_requires) it $"$(it)) $.(, ))]
@@ -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 allbuildrequires, InstallDeps, pipify
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
- 'manylinux_2_28_x86_64': '2023-11-13-f6b0c51',
34
- 'manylinux_2_24_x86_64': '2022-12-26-0d38463',
35
- 'manylinux_2_24_i686': '2022-12-26-0d38463',
36
- 'manylinux2014_x86_64': '2020-08-29-f97fd86',
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(info))) as venv:
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 find_packages, setup
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
@@ -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
- info = ProjectInfo.seek('.')
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,7 +1,7 @@
1
1
  from contextlib import contextmanager
2
2
  import os, re, sys
3
3
 
4
- pyversiontags = {2: ['2'], 3: ['3.6', '3.7', '3.8', '3.9']}
4
+ pyversiontags = {2: ['2'], 3: ['3.9', '3.10', '3.11', '3.12', '3.13']}
5
5
 
6
6
  def stderr(obj):
7
7
  sys.stderr.write(str(obj))
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 97
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: shrovis@foyono.com
7
+ Author-email: homsar@foyono.com
8
8
  Description-Content-Type: text/markdown
9
9
  Requires-Dist: aridity>=77
10
- Requires-Dist: diapyr>=27
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
@@ -1,5 +1,5 @@
1
1
  aridity>=77
2
- diapyr>=27
2
+ diapyr>=31
3
3
  lagoon>=24
4
4
  pydoc-markdown>=3.3
5
5
  setuptools>=44.1.1
@@ -1,5 +1,5 @@
1
1
  [bdist_wheel]
2
- universal = 1
2
+ universal = 0
3
3
 
4
4
  [egg_info]
5
5
  tag_build =
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
+ )
@@ -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,2 +0,0 @@
1
- [build-system]
2
- requires = [$join($map($(build requires) it $"$(it)) $.(, ))]
@@ -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
- )
@@ -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-97/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 = '97',
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>=77', '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
- )
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