pyven 90__tar.gz → 92__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 (47) hide show
  1. {pyven-90/pyven.egg-info → pyven-92}/PKG-INFO +1 -1
  2. {pyven-90 → pyven-92}/pyven/bdist.py +13 -11
  3. {pyven-90 → pyven-92}/pyven/checks.py +13 -6
  4. {pyven-90 → pyven-92}/pyven/patchpolicy.py +6 -2
  5. {pyven-90 → pyven-92}/pyven/projectinfo.arid +1 -5
  6. {pyven-90 → pyven-92}/pyven/release.py +27 -14
  7. {pyven-90 → pyven-92}/pyven/sourceinfo.py +1 -1
  8. {pyven-90 → pyven-92}/pyven/tryinstall.py +2 -1
  9. {pyven-90 → pyven-92}/pyven/util.py +5 -0
  10. {pyven-90 → pyven-92/pyven.egg-info}/PKG-INFO +1 -1
  11. {pyven-90 → pyven-92}/pyven.egg-info/requires.txt +1 -1
  12. {pyven-90 → pyven-92}/setup.py +3 -3
  13. {pyven-90 → pyven-92}/COPYING +0 -0
  14. {pyven-90 → pyven-92}/README.md +0 -0
  15. {pyven-90 → pyven-92}/foreignsyms +0 -0
  16. {pyven-90 → pyven-92}/pyven/README.md.aridt +0 -0
  17. {pyven-90 → pyven-92}/pyven/__init__.py +0 -0
  18. {pyven-90 → pyven-92}/pyven/cythonize.py +0 -0
  19. {pyven-90 → pyven-92}/pyven/divcheck.py +0 -0
  20. {pyven-90 → pyven-92}/pyven/drmake.py +0 -0
  21. {pyven-90 → pyven-92}/pyven/execcheck.py +0 -0
  22. {pyven-90 → pyven-92}/pyven/files.py +0 -0
  23. {pyven-90 → pyven-92}/pyven/gclean.py +0 -0
  24. {pyven-90 → pyven-92}/pyven/launch.py +0 -0
  25. {pyven-90 → pyven-92}/pyven/licheck.py +0 -0
  26. {pyven-90 → pyven-92}/pyven/mainmodules.py +0 -0
  27. {pyven-90 → pyven-92}/pyven/minreqs.py +0 -0
  28. {pyven-90 → pyven-92}/pyven/nlcheck.py +0 -0
  29. {pyven-90 → pyven-92}/pyven/pipify.py +0 -0
  30. {pyven-90 → pyven-92}/pyven/projectinfo.py +0 -0
  31. {pyven-90 → pyven-92}/pyven/pyproject.toml.aridt +0 -0
  32. {pyven-90 → pyven-92}/pyven/release.arid +0 -0
  33. {pyven-90 → pyven-92}/pyven/setup.cfg.aridt +0 -0
  34. {pyven-90 → pyven-92}/pyven/setup.py.aridt +0 -0
  35. {pyven-90 → pyven-92}/pyven/setuproot/Cython/Build.py +0 -0
  36. {pyven-90 → pyven-92}/pyven/setuproot/Cython/__init__.py +0 -0
  37. {pyven-90 → pyven-92}/pyven/setuproot/__init__.py +0 -0
  38. {pyven-90 → pyven-92}/pyven/setuproot/ez_setup.py +0 -0
  39. {pyven-90 → pyven-92}/pyven/setuproot/fakesetup.py +0 -0
  40. {pyven-90 → pyven-92}/pyven/setuproot/setuptools.arid +0 -0
  41. {pyven-90 → pyven-92}/pyven/tasks.py +0 -0
  42. {pyven-90 → pyven-92}/pyven/tests/__init__.py +0 -0
  43. {pyven-90 → pyven-92}/pyven.egg-info/SOURCES.txt +0 -0
  44. {pyven-90 → pyven-92}/pyven.egg-info/dependency_links.txt +0 -0
  45. {pyven-90 → pyven-92}/pyven.egg-info/entry_points.txt +0 -0
  46. {pyven-90 → pyven-92}/pyven.egg-info/top_level.txt +0 -0
  47. {pyven-90 → pyven-92}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 90
3
+ Version: 92
4
4
  Summary: Manage development of multiple Python projects
5
5
  Home-page: https://github.com/combatopera/pyven
6
6
  Author: Andrzej Cichocki
@@ -16,33 +16,35 @@
16
16
  # along with pyven. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
18
  from argparse import ArgumentParser
19
+ from glob import iglob
19
20
  from tempfile import mkdtemp
20
21
  import logging, os, shutil, subprocess
21
22
 
22
23
  log = logging.getLogger(__name__)
23
- pythonroot = '/opt/python'
24
24
  distdir = 'dist'
25
25
 
26
26
  def main():
27
27
  logging.basicConfig(format = "<%(levelname)s> %(message)s", level = logging.DEBUG)
28
28
  parser = ArgumentParser()
29
29
  parser.add_argument('--plat', required = True)
30
- parser.add_argument('--prune', action = 'store_true')
31
- parser.add_argument('compatibilities', nargs = '+')
30
+ parser.add_argument('pyversions', nargs = '+')
32
31
  args = parser.parse_args()
33
32
  holder = mkdtemp()
34
33
  try:
35
- for compatibility in args.compatibilities:
36
- pip = os.path.join(pythonroot, compatibility, 'bin', 'pip')
37
- if not os.path.exists(pip):
38
- log.warning("Image does not support implementation-ABI: %s", compatibility)
39
- continue
34
+ for pip in sorted(iglob("/opt/python/cp[%s]*/bin/pip" % ''.join(args.pyversions))):
35
+ compatibility = pip.split(os.sep)[3]
40
36
  log.info("Make wheel(s) for implementation-ABI: %s", compatibility)
41
- subprocess.check_call([pip, '--no-cache-dir', 'wheel', '--no-deps', '-w', holder, '.'])
37
+ try:
38
+ subprocess.check_call([pip, '--no-cache-dir', 'wheel', '--no-deps', '-w', holder, '.'])
39
+ except subprocess.CalledProcessError:
40
+ log.warning('Skip compatibility:', exc_info = True)
41
+ continue
42
42
  wheelpath, = (os.path.join(holder, n) for n in os.listdir(holder))
43
43
  subprocess.check_call(['auditwheel', 'repair', '--plat', args.plat, '-w', distdir, wheelpath])
44
- if not args.prune:
45
- shutil.copy2(wheelpath, distdir)
44
+ plaintarget = os.path.join(distdir, os.path.basename(wheelpath))
45
+ if os.path.exists(plaintarget):
46
+ log.info("Replace plain wheel: %s", plaintarget)
47
+ shutil.copy2(wheelpath, distdir)
46
48
  os.remove(wheelpath)
47
49
  finally:
48
50
  shutil.rmtree(holder)
@@ -18,13 +18,14 @@
18
18
  from .files import Files
19
19
  from .pipify import InstallDeps
20
20
  from .projectinfo import ProjectInfo, SimpleInstallDeps
21
- from .util import bgcontainer, Excludes, pyversiontags, stderr
21
+ from .util import bgcontainer, Excludes, initapt, pyversiontags, stderr
22
22
  from argparse import ArgumentParser
23
23
  from aridity.config import ConfigCtrl
24
24
  from aridity.util import NoSuchPathException, openresource
25
25
  from diapyr.util import singleton
26
26
  from itertools import chain
27
27
  from lagoon import diff
28
+ from lagoon.program import partial
28
29
  from setuptools import find_packages
29
30
  from tempfile import NamedTemporaryFile
30
31
  from venvpool import initlogging, Pool
@@ -113,12 +114,13 @@ class EveryVersion:
113
114
  xmlpath = os.path.join(reportsdir, 'nosetests.xml')
114
115
  if self.docker:
115
116
  coveragepath = os.path.join(self.info.projectdir, '.coverage')
116
- with bgcontainer('-v', "%s:%s" % (os.path.abspath(self.info.projectdir), Container.workdir), "python:%s" % pyversiontags[pyversion][0]) as container:
117
+ 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:
117
118
  container = Container(container)
118
119
  container.inituser()
119
120
  if upstream_devel_packages:
120
- for command in ['apt-get', 'update'], ['apt-get', 'install', '-y'] + upstream_devel_packages:
121
- container.call(command, check = True, root = True)
121
+ container.initapt()
122
+ for command in ['apt-get', 'update'], ['apt-get', 'install', '-y', 'sudo'] + upstream_devel_packages:
123
+ container.call(command, check = True, root = True)
122
124
  installdeps.invoke(container)
123
125
  cpath = lambda p: os.path.relpath(p, self.info.projectdir).replace(os.sep, '/')
124
126
  status = container.call([
@@ -179,8 +181,13 @@ class Container:
179
181
 
180
182
  def inituser(self):
181
183
  from lagoon import docker
184
+ docker('exec', self.container, 'groupadd', '-g', os.stat('/var/run/docker.sock').st_gid, 'docker', stdout = None)
182
185
  docker('exec', self.container, 'groupadd', '-g', self.gid, 'pyvengroup', stdout = None)
183
- docker('exec', self.container, 'useradd', '-g', self.gid, '-u', self.uid, '-m', 'pyvenuser', stdout = None)
186
+ docker('exec', self.container, 'useradd', '-g', self.gid, '-G', 'docker', '-u', self.uid, '-m', 'pyvenuser', stdout = None)
187
+
188
+ def initapt(self):
189
+ from lagoon import docker
190
+ initapt(docker[partial]('exec', self.container, stdout = None))
184
191
 
185
192
  def install(self, args):
186
193
  from lagoon import docker
@@ -189,7 +196,7 @@ class Container:
189
196
 
190
197
  def call(self, args, check = False, root = False):
191
198
  from lagoon import docker
192
- return docker('exec', '-w', self.workdir, *([] if root else ['-u', "%s:%s" % (self.uid, self.gid)]) + [self.container] + args, stdout = None, check = check)
199
+ return docker('exec', '-w', self.workdir, self.container, *([] if root else ['sudo', '-u', 'pyvenuser']) + args, stdout = None, check = check)
193
200
 
194
201
  def main():
195
202
  initlogging()
@@ -15,13 +15,17 @@
15
15
  # You should have received a copy of the GNU General Public License
16
16
  # along with pyven. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
+ from itertools import chain
18
19
  import glob, json
19
20
 
20
- policyglob = '/opt/_internal/*/lib/python3.7/site-packages/auditwheel/policy/policy.json'
21
+ policyglobs = [
22
+ '/opt/_internal/*/lib/python3.7/site-packages/auditwheel/policy/policy.json',
23
+ '/opt/_internal/pipx/venvs/auditwheel/lib/python3.10/site-packages/auditwheel/policy/manylinux-policy.json',
24
+ ]
21
25
  syslibs = 'libasound.so.2', 'libjack.so.0', 'libportaudio.so.2'
22
26
 
23
27
  def main():
24
- policypath, = glob.iglob(policyglob)
28
+ policypath, = chain(*map(glob.iglob, policyglobs))
25
29
  with open(policypath) as f:
26
30
  policy = json.load(f)
27
31
  for edition in policy:
@@ -30,13 +30,9 @@ licheck
30
30
  flakes exclude globs := $list()
31
31
  pypi participant = true
32
32
  github participant = $¬$(proprietary)
33
- wheel compatibilities
34
- 2 := $list(cp27-cp27m cp27-cp27mu)
35
- 3 := $list(cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39)
36
- all = $flat$map($(pyversions) $$())
37
33
  devel
38
34
  packages := $list()
39
35
  scripts := $list()
40
36
  warmups := $list()
41
37
  upstream devel packages := $list()
42
- $.(test) requires := $list()
38
+ test requires := $list()
@@ -24,7 +24,7 @@ from .sourceinfo import SourceInfo
24
24
  from .util import bgcontainer
25
25
  from argparse import ArgumentParser
26
26
  from aridity.config import ConfigCtrl
27
- from diapyr.util import enum, singleton
27
+ from diapyr.util import singleton
28
28
  from itertools import chain
29
29
  from lagoon.program import partial, Program
30
30
  from pkg_resources import resource_filename
@@ -36,12 +36,27 @@ import lagoon, logging, os, re, shutil, sys, sysconfig
36
36
  log = logging.getLogger(__name__)
37
37
  distrelpath = 'dist'
38
38
 
39
- @enum(
40
- ['2020-08-29-f97fd86', 'manylinux2014_x86_64', False],
41
- ['2020-08-29-f97fd86', 'manylinux2014_i686', True],
42
- ['2020-12-18-bcf804e', 'manylinux2010_x86_64', False, True],
43
- ['2020-12-18-bcf804e', 'manylinux2010_i686', True, True],
44
- )
39
+ class Arch:
40
+
41
+ def __init__(self, entrypointornone):
42
+ self.entrypoint = [] if entrypointornone is None else [entrypointornone]
43
+
44
+ def _images():
45
+ archlookup = dict(
46
+ i686 = Arch('linux32'),
47
+ x86_64 = Arch(None),
48
+ )
49
+ archmatch = re.compile("_(%s)$" % '|'.join(map(re.escape, archlookup))).search
50
+ images = {
51
+ 'manylinux_2_28_x86_64': '2023-11-13-f6b0c51',
52
+ 'manylinux_2_24_x86_64': '2022-12-26-0d38463',
53
+ 'manylinux_2_24_i686': '2022-12-26-0d38463',
54
+ 'manylinux2014_x86_64': '2020-08-29-f97fd86',
55
+ 'manylinux2014_i686': '2020-08-29-f97fd86',
56
+ }
57
+ for plat, imagetag in images.items():
58
+ yield Image(imagetag, plat, archlookup[archmatch(plat).group(1)])
59
+
45
60
  class Image:
46
61
 
47
62
  prefix = 'quay.io/pypa/'
@@ -51,11 +66,10 @@ class Image:
51
66
  impl = "cp%s" % sysconfig.get_config_var('py_version_nodot')
52
67
  return "/opt/python/%s-%s%s/bin/python" % (impl, impl, sys.abiflags)
53
68
 
54
- def __init__(self, imagetag, plat, linux32, keepplainwhl = False):
69
+ def __init__(self, imagetag, plat, arch):
55
70
  self.imagetag = imagetag
56
71
  self.plat = plat
57
- self.entrypoint = ['linux32'] if linux32 else []
58
- self.prune = [] if keepplainwhl else ['--prune']
72
+ self.arch = arch
59
73
 
60
74
  def makewheels(self, info): # TODO: This code would benefit from modern syntax.
61
75
  from lagoon import docker
@@ -64,11 +78,10 @@ class Image:
64
78
  log.info("Make wheels for platform: %s", self.plat)
65
79
  scripts = list(info.config.devel.scripts)
66
80
  packages = list(chain(info.config.devel.packages, ['sudo'] if scripts else []))
67
- compatibilities = list(info.config.wheel.compatibilities.all)
68
81
  # TODO: Copy not mount so we can run containers in parallel.
69
82
  with bgcontainer('-v', "%s:/io" % info.projectdir, "%s%s:%s" % (self.prefix, self.plat, self.imagetag)) as container:
70
83
  def run(execargs, command):
71
- docker_print(*chain(['exec'], execargs, [container], self.entrypoint, command))
84
+ docker_print(*chain(['exec'], execargs, [container], self.arch.entrypoint, command))
72
85
  if packages:
73
86
  try:
74
87
  run([], chain(['yum', 'install', '-y'], packages))
@@ -83,7 +96,7 @@ class Image:
83
96
  docker_print.cp(resource_filename(__name__, 'patchpolicy.py'), "%s:/patchpolicy.py" % container)
84
97
  run([], [self.pythonexe, '/patchpolicy.py'])
85
98
  docker_print.cp(resource_filename(__name__, 'bdist.py'), "%s:/bdist.py" % container)
86
- run(['-u', "%s:%s" % (os.geteuid(), os.getegid()), '-w', '/io'], chain([self.pythonexe, '/bdist.py', '--plat', self.plat], self.prune, compatibilities))
99
+ run(['-u', "%s:%s" % (os.geteuid(), os.getegid()), '-w', '/io'], chain([self.pythonexe, '/bdist.py', '--plat', self.plat], info.config.pyversions))
87
100
 
88
101
  def main():
89
102
  initlogging()
@@ -158,7 +171,7 @@ def release(config, srcgit, info):
158
171
  shutil.rmtree(os.path.join(info.projectdir, '.git'))
159
172
  setupcommands = []
160
173
  if SourceInfo(info.projectdir).extpaths:
161
- for image in Image.enum:
174
+ for image in _images():
162
175
  image.makewheels(info)
163
176
  else:
164
177
  setupcommands.append('bdist_wheel')
@@ -27,7 +27,7 @@ class SourceInfo:
27
27
 
28
28
  def buildrequires(self):
29
29
  if self.path.endswith('.pyx'):
30
- yield 'Cython'
30
+ yield 'Cython<3'
31
31
 
32
32
  def make_ext(self):
33
33
  g = {}
@@ -19,7 +19,7 @@
19
19
  from .checks import EveryVersion
20
20
  from .pipify import pipify
21
21
  from .projectinfo import ProjectInfo
22
- from .util import bgcontainer, pyversiontags
22
+ from .util import bgcontainer, initapt, pyversiontags
23
23
  from lagoon import git
24
24
  from lagoon.program import partial
25
25
  from urllib.request import urlopen
@@ -46,6 +46,7 @@ def main():
46
46
  with bgcontainer("python:%s" % pyversion) as container:
47
47
  containerexec = docker[partial]('exec', container, stdout = None)
48
48
  if upstream_devel_packages:
49
+ initapt(containerexec)
49
50
  containerexec('apt-get', 'update')
50
51
  containerexec('apt-get', 'install', '-y', *upstream_devel_packages)
51
52
  containerexec('pip', 'install', req)
@@ -93,3 +93,8 @@ def bgcontainer(*dockerrunargs):
93
93
  yield container
94
94
  finally:
95
95
  docker.rm._f(container, stdout = None)
96
+
97
+ def initapt(dockerexec):
98
+ dockerexec('mkdir', '-pv', '/etc/apt/keyrings')
99
+ dockerexec('curl', '-fsSL', 'https://download.docker.com/linux/debian/gpg', '-o', '/etc/apt/keyrings/docker.asc')
100
+ dockerexec('sh', '-c', 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 90
3
+ Version: 92
4
4
  Summary: Manage development of multiple Python projects
5
5
  Home-page: https://github.com/combatopera/pyven
6
6
  Author: Andrzej Cichocki
@@ -1,4 +1,4 @@
1
- aridity>=62
1
+ aridity>=67
2
2
  diapyr>=18
3
3
  lagoon>=24
4
4
  setuptools>=44.1.1
@@ -50,7 +50,7 @@ class SourceInfo:
50
50
 
51
51
  def buildrequires(self):
52
52
  if self.path.endswith('.pyx'):
53
- yield 'Cython'
53
+ yield 'Cython<3'
54
54
 
55
55
  def make_ext(self):
56
56
  g = {}
@@ -136,7 +136,7 @@ def ext_modules():
136
136
  sourceinfo = SourceInfo('.')
137
137
  setuptools.setup(
138
138
  name = 'pyven',
139
- version = '90',
139
+ version = '92',
140
140
  description = 'Manage development of multiple Python projects',
141
141
  long_description = long_description(),
142
142
  long_description_content_type = 'text/markdown',
@@ -144,7 +144,7 @@ setuptools.setup(
144
144
  author = 'Andrzej Cichocki',
145
145
  packages = sourceinfo.packages,
146
146
  py_modules = [],
147
- install_requires = ['aridity>=62', 'diapyr>=18', 'lagoon>=24', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=10'],
147
+ install_requires = ['aridity>=67', 'diapyr>=18', 'lagoon>=24', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=10'],
148
148
  package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
149
149
  scripts = ['foreignsyms'],
150
150
  entry_points = {'console_scripts': ['drmake=pyven.drmake:main', 'gclean=pyven.gclean: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']},
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes