pyven 93__tar.gz → 95__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-93 → pyven-95}/PKG-INFO +5 -3
  2. {pyven-93 → pyven-95}/README.md +1 -0
  3. {pyven-93 → pyven-95}/pyven/README.md.aridt +1 -0
  4. {pyven-93 → pyven-95}/pyven/checks.py +7 -2
  5. {pyven-93 → pyven-95}/pyven/pipify.py +41 -21
  6. {pyven-93 → pyven-95}/pyven/projectinfo.arid +1 -0
  7. {pyven-93 → pyven-95}/pyven/release.py +2 -7
  8. pyven-95/pyven/setup-native.py.aridt +25 -0
  9. pyven-95/pyven/setup.py.aridt +21 -0
  10. {pyven-93 → pyven-95}/pyven.egg-info/PKG-INFO +5 -3
  11. {pyven-93 → pyven-95}/pyven.egg-info/SOURCES.txt +1 -0
  12. {pyven-93 → pyven-95}/pyven.egg-info/requires.txt +1 -1
  13. pyven-95/setup.py +21 -0
  14. pyven-93/pyven/setup.py.aridt +0 -27
  15. pyven-93/setup.py +0 -99
  16. {pyven-93 → pyven-95}/pyven/__init__.py +0 -0
  17. {pyven-93 → pyven-95}/pyven/bdist.py +0 -0
  18. {pyven-93 → pyven-95}/pyven/cythonize.py +0 -0
  19. {pyven-93 → pyven-95}/pyven/divcheck.py +0 -0
  20. {pyven-93 → pyven-95}/pyven/drmake.py +0 -0
  21. {pyven-93 → pyven-95}/pyven/execcheck.py +0 -0
  22. {pyven-93 → pyven-95}/pyven/files.py +0 -0
  23. {pyven-93 → pyven-95}/pyven/functions.py +0 -0
  24. {pyven-93 → pyven-95}/pyven/gclean.py +0 -0
  25. {pyven-93 → pyven-95}/pyven/launch.py +0 -0
  26. {pyven-93 → pyven-95}/pyven/licheck.py +0 -0
  27. {pyven-93 → pyven-95}/pyven/mainmodules.py +0 -0
  28. {pyven-93 → pyven-95}/pyven/minreqs.py +0 -0
  29. {pyven-93 → pyven-95}/pyven/nlcheck.py +0 -0
  30. {pyven-93 → pyven-95}/pyven/patchpolicy.py +0 -0
  31. {pyven-93 → pyven-95}/pyven/projectinfo.py +0 -0
  32. {pyven-93 → pyven-95}/pyven/pyproject.toml.aridt +0 -0
  33. {pyven-93 → pyven-95}/pyven/release.arid +0 -0
  34. {pyven-93 → pyven-95}/pyven/setup.cfg.aridt +0 -0
  35. {pyven-93 → pyven-95}/pyven/setuptools.arid +0 -0
  36. {pyven-93 → pyven-95}/pyven/sourceinfo.py +0 -0
  37. {pyven-93 → pyven-95}/pyven/tasks.py +0 -0
  38. {pyven-93 → pyven-95}/pyven/tests/__init__.py +0 -0
  39. {pyven-93 → pyven-95}/pyven/tryinstall.py +0 -0
  40. {pyven-93 → pyven-95}/pyven/util.py +0 -0
  41. {pyven-93 → pyven-95}/pyven.egg-info/dependency_links.txt +0 -0
  42. {pyven-93 → pyven-95}/pyven.egg-info/entry_points.txt +0 -0
  43. {pyven-93 → pyven-95}/pyven.egg-info/top_level.txt +0 -0
  44. {pyven-93 → pyven-95}/setup.cfg +0 -0
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 93
3
+ Version: 95
4
4
  Summary: Manage development of multiple Python projects
5
- Home-page: UNKNOWN
6
- Author: foyono
5
+ Home-page: https://pypi.org/project/pyven/
6
+ Author: Homsar
7
+ Author-email: shrovis@foyono.com
7
8
  License: UNKNOWN
8
9
  Platform: UNKNOWN
9
10
  Description-Content-Type: text/markdown
@@ -24,6 +25,7 @@ pip3 install --user pyven
24
25
  If you prefer to keep .local clean, install to a virtualenv:
25
26
  ```
26
27
  python3 -m venv venvname
28
+ venvname/bin/pip install -U pip
27
29
  venvname/bin/pip install pyven
28
30
  . venvname/bin/activate
29
31
  ```
@@ -14,6 +14,7 @@ pip3 install --user pyven
14
14
  If you prefer to keep .local clean, install to a virtualenv:
15
15
  ```
16
16
  python3 -m venv venvname
17
+ venvname/bin/pip install -U pip
17
18
  venvname/bin/pip install pyven
18
19
  . venvname/bin/activate
19
20
  ```
@@ -14,6 +14,7 @@ pip$first$(pyversions) install --user $(name)
14
14
  If you prefer to keep .local clean, install to a virtualenv:
15
15
  ```
16
16
  python$first$(pyversions) -m venv venvname
17
+ venvname/bin/pip install -U pip
17
18
  venvname/bin/pip install $(name)
18
19
  . venvname/bin/activate
19
20
  ```$try($join$list$first$map($(commands) $.[
@@ -11,7 +11,7 @@ from lagoon import diff
11
11
  from lagoon.program import partial
12
12
  from setuptools import find_packages
13
13
  from tempfile import NamedTemporaryFile
14
- from venvpool import initlogging, Pool
14
+ from venvpool import initlogging, Pool, Task
15
15
  import logging, os, shutil, subprocess, sys
16
16
 
17
17
  log = logging.getLogger(__name__)
@@ -114,7 +114,12 @@ class EveryVersion:
114
114
  else:
115
115
  coveragepath = '.coverage'
116
116
  with Pool(pyversion).readonlyortransient[self.transient](installdeps) as venv:
117
- status = venv.run('call', installdeps.localreqs, 'nose', [
117
+ status = venv.run('call', installdeps.localreqs, Task('''import collections
118
+ try:
119
+ collections.Callable
120
+ except AttributeError:
121
+ from collections.abc import Callable
122
+ collections.Callable = Callable''', 'nose'), [
118
123
  '--exe', '-v',
119
124
  '--with-xunit', '--xunit-file', xmlpath,
120
125
  '--with-cov', '--cov-report', 'term-missing',
@@ -2,6 +2,7 @@
2
2
  from .projectinfo import ProjectInfo, Req, SimpleInstallDeps
3
3
  from .sourceinfo import SourceInfo
4
4
  from argparse import ArgumentParser
5
+ from aridity.config import ConfigCtrl
5
6
  from pkg_resources import resource_filename
6
7
  from tempfile import mkdtemp
7
8
  from venvpool import initlogging, Pool
@@ -12,34 +13,53 @@ log = logging.getLogger(__name__)
12
13
  def pipify(info, version = None):
13
14
  release = version is not None
14
15
  # Allow release of project without origin:
15
- _, url = info.descriptionandurl() if release and info.config.github.participant else [None, None]
16
- config = (-info.config).childctrl()
17
- config.put('version', scalar = version if release else info.devversion())
18
- config.put('description', scalar = info.config.tagline)
19
- config.put('long_description', text = 'long_description()' if release else repr(None))
20
- config.put('url', scalar = url)
21
- if not release:
22
- config.put('author', scalar = None)
23
- config.put('py_modules', scalar = info.py_modules())
24
- config.put('install_requires', scalar = info.allrequires())
25
- config.put('console_scripts', scalar = info.console_scripts())
26
- config.put('universal', number = int({2, 3} <= set(info.config.pyversions)))
16
+ if release:
17
+ if info.config.github.participant:
18
+ _, url = info.descriptionandurl()
19
+ elif info.config.pypi.participant:
20
+ url = "https://pypi.org/project/%s/" % info.config.name
21
+ else:
22
+ raise Exception
23
+ else:
24
+ url = None
25
+ cc = ConfigCtrl()
26
+ cc.execute('''py_modules := $list()
27
+ install_requires := $list()
28
+ console_scripts := $list()
29
+ ''')
30
+ cc.w.name = info.config.name
31
+ cc.w.tagline = info.config.tagline
32
+ for t in info.config.resource.types:
33
+ cc.w.resource.types += t
34
+ cc.w.version = version if release else info.devversion()
35
+ cc.w.description = info.config.tagline
36
+ cc.w.long_description = 'long_description()' if release else repr(None)
37
+ cc.w.url = url
38
+ cc.w.author = info.config.author if release else None
39
+ cc.w.author_email = info.config.author_email if release else None
40
+ for m in info.py_modules():
41
+ cc.w.py_modules += m
42
+ for r in info.allrequires():
43
+ cc.w.install_requires += r
44
+ for s in info.console_scripts():
45
+ cc.w.console_scripts += s
46
+ cc.w.universal = int({2, 3} <= set(info.config.pyversions))
27
47
  # XXX: Use soak to generate these?
28
- nametoquote = [
29
- ['setup.py', 'pystr'],
30
- ['setup.cfg', 'void'],
48
+ tasks = [
49
+ ['setup.py', 'setup-native.py.aridt' if info.config.native else 'setup.py.aridt', 'pystr'],
50
+ ['setup.cfg', 'setup.cfg.aridt', 'void'],
31
51
  ]
32
52
  seen = set()
33
53
  for name in allbuildrequires(info):
34
54
  if name not in seen:
35
55
  seen.add(name)
36
- config.printf("build requires += %s", name)
56
+ cc.w.build.requires += name
37
57
  if seen != {'setuptools', 'wheel'}:
38
- nametoquote.append(['pyproject.toml', 'tomlquote'])
39
- for name, quote in nametoquote:
40
- config.printf('" = $(%s)', quote)
41
- config.processtemplate(
42
- resource_filename(__name__, name + '.aridt'), # TODO LATER: Make aridity get the resource.
58
+ tasks.append(['pyproject.toml', 'pyproject.toml.aridt', 'tomlquote'])
59
+ for name, template, quote in tasks:
60
+ cc.printf('" = $(%s)', quote)
61
+ cc.processtemplate(
62
+ resource_filename(__name__, template), # TODO LATER: Make aridity get the resource.
43
63
  os.path.abspath(os.path.join(info.projectdir, name)))
44
64
 
45
65
  def allbuildrequires(info):
@@ -24,3 +24,4 @@ warmups := $list()
24
24
  upstream devel packages := $list()
25
25
  test requires := $list()
26
26
  tagline = $(void)
27
+ native = false
@@ -10,7 +10,6 @@ from diapyr.util import singleton
10
10
  from itertools import chain
11
11
  from lagoon.program import partial, Program
12
12
  from pkg_resources import resource_filename
13
- from subprocess import CalledProcessError
14
13
  from tempfile import NamedTemporaryFile
15
14
  from venvpool import dotpy, initlogging, Pip, Pool, TemporaryDirectory
16
15
  import lagoon, logging, os, re, shutil, sys, sysconfig
@@ -60,17 +59,13 @@ class Image:
60
59
  docker_print = docker[partial](stdout = None)
61
60
  log.info("Make wheels for platform: %s", self.plat)
62
61
  scripts = list(info.config.devel.scripts)
63
- packages = list(chain(info.config.devel.packages, ['sudo'] if scripts else []))
62
+ packages = list(info.config.devel.packages)
64
63
  # TODO: Copy not mount so we can run containers in parallel.
65
64
  with bgcontainer('-v', "%s:/io" % info.projectdir, "%s%s:%s" % (self.prefix, self.plat, self.imagetag)) as container:
66
65
  def run(execargs, command):
67
66
  docker_print(*chain(['exec'], execargs, [container], self.arch.entrypoint, command))
68
67
  if packages:
69
- try:
70
- run([], chain(['yum', 'install', '-y'], packages))
71
- except CalledProcessError:
72
- log.warning("Failed to install dependencies, skip %s wheels:", self.plat, exc_info = True)
73
- return
68
+ run([], chain(['yum', 'install', '-y'], packages))
74
69
  for script in scripts:
75
70
  # TODO LATER: Run as ordinary sudo-capable user.
76
71
  dirpath = docker[NOEOL]('exec', container, 'mktemp', '-d') # No need to cleanup, will die with container.
@@ -0,0 +1,25 @@
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
+ )
@@ -0,0 +1,21 @@
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 = $"$(name),
9
+ version = $"$(version),
10
+ description = $"$(tagline),
11
+ long_description = $(long_description),
12
+ long_description_content_type = 'text/markdown',
13
+ url = $"$(url),
14
+ author = $"$(author),
15
+ author_email = $"$(author_email),
16
+ packages = find_packages(),
17
+ py_modules = [$join($map($(py_modules) $"$()) $.(, ))],
18
+ install_requires = [$join($map($(install_requires) $"$()) $.(, ))],
19
+ package_data = {'': [$join($map($(resource types) $"(*.$())) $.(, ))]},
20
+ entry_points = {'console_scripts': [$join($map($(console_scripts) $"$()) $.(, ))]},
21
+ )
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyven
3
- Version: 93
3
+ Version: 95
4
4
  Summary: Manage development of multiple Python projects
5
- Home-page: UNKNOWN
6
- Author: foyono
5
+ Home-page: https://pypi.org/project/pyven/
6
+ Author: Homsar
7
+ Author-email: shrovis@foyono.com
7
8
  License: UNKNOWN
8
9
  Platform: UNKNOWN
9
10
  Description-Content-Type: text/markdown
@@ -24,6 +25,7 @@ pip3 install --user pyven
24
25
  If you prefer to keep .local clean, install to a virtualenv:
25
26
  ```
26
27
  python3 -m venv venvname
28
+ venvname/bin/pip install -U pip
27
29
  venvname/bin/pip install pyven
28
30
  . venvname/bin/activate
29
31
  ```
@@ -24,6 +24,7 @@ pyven/projectinfo.py
24
24
  pyven/pyproject.toml.aridt
25
25
  pyven/release.arid
26
26
  pyven/release.py
27
+ pyven/setup-native.py.aridt
27
28
  pyven/setup.cfg.aridt
28
29
  pyven/setup.py.aridt
29
30
  pyven/setuptools.arid
@@ -3,4 +3,4 @@ diapyr>=27
3
3
  lagoon>=24
4
4
  setuptools>=44.1.1
5
5
  twine>=1.15.0
6
- venvpool>=10
6
+ venvpool>=14
pyven-95/setup.py ADDED
@@ -0,0 +1,21 @@
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 = '95',
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', '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', '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']},
21
+ )
@@ -1,27 +0,0 @@
1
- import setuptools
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
- def ext_modules():
10
- extensions = [path.make_ext() for path in sourceinfo.extpaths]
11
- return dict(ext_modules = cythonize(extensions)) if extensions else {}
12
-
13
- sourceinfo = SourceInfo('.')
14
- setuptools.setup(
15
- name = $"$(name),
16
- version = $"$(version),
17
- description = $"$(tagline),
18
- long_description = $(long_description),
19
- long_description_content_type = 'text/markdown',
20
- url = $"$(url),
21
- author = $"$(author),
22
- packages = sourceinfo.packages,
23
- py_modules = $"$(py_modules),
24
- install_requires = $"$(install_requires),
25
- package_data = {'': [$join($map($(resource types) it $"(*.$(it))) $.(, ))]},
26
- entry_points = {'console_scripts': $"$(console_scripts)},
27
- **ext_modules())
pyven-93/setup.py DELETED
@@ -1,99 +0,0 @@
1
- import setuptools
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
- suffixes = '.pyx', '.c'
12
-
13
- def __init__(self, module, path):
14
- self.module = module
15
- self.path = path
16
-
17
- def buildrequires(self):
18
- if self.path.endswith('.pyx'):
19
- yield 'Cython<3'
20
-
21
- def make_ext(self):
22
- g = {}
23
- with open(self.path + 'bld') as f: # Assume project root.
24
- exec(f.read(), g)
25
- return g['make_ext'](self.module, self.path)
26
-
27
- def __init__(self, rootdir):
28
- import os, setuptools, subprocess
29
- self.packages = setuptools.find_packages(rootdir)
30
- extpaths = {}
31
- def addextpaths(dirpath, moduleprefix):
32
- names = sorted(os.listdir(os.path.join(rootdir, dirpath)))
33
- for suffix in self.PYXPath.suffixes:
34
- for name in names:
35
- if name.endswith(suffix):
36
- module = "%s%s" % (moduleprefix, name[:-len(suffix)])
37
- if module not in extpaths:
38
- extpaths[module] = self.PYXPath(module, os.path.join(dirpath, name))
39
- addextpaths('.', '')
40
- for package in self.packages:
41
- addextpaths(package.replace('.', os.sep), "%s." % package)
42
- extpaths = extpaths.values()
43
- if extpaths and os.path.isdir(os.path.join(rootdir, '.git')): # We could be an unpacked sdist.
44
- check_ignore = subprocess.Popen(['git', 'check-ignore'] + [p.path for p in extpaths], cwd = rootdir, stdout = subprocess.PIPE)
45
- ignoredpaths = set(check_ignore.communicate()[0].decode().splitlines())
46
- assert check_ignore.wait() in [0, 1]
47
- self.extpaths = [path for path in extpaths if path.path not in ignoredpaths]
48
- else:
49
- self.extpaths = extpaths
50
-
51
- def lazy(clazz, init, *initbefore):
52
- from threading import Lock
53
- initlock = Lock()
54
- init = [init]
55
- def overridefactory(name):
56
- orig = getattr(clazz, name)
57
- def override(*args, **kwargs):
58
- with initlock:
59
- if init:
60
- init[0](obj)
61
- del init[:]
62
- return orig(*args, **kwargs)
63
- return override
64
- Lazy = type('Lazy', (clazz, object), {name: overridefactory(name) for name in initbefore})
65
- obj = Lazy()
66
- return obj
67
-
68
- # FIXME: The idea was to defer anything Cython/numpy to pyximport time, but this doesn't achieve that.
69
- def cythonize(extensions):
70
- def init(ext_modules):
71
- ordinary = []
72
- cythonizable = []
73
- for e in extensions:
74
- (cythonizable if any(s.endswith('.pyx') for s in e.sources) else ordinary).append(e)
75
- if cythonizable:
76
- from Cython.Build import cythonize
77
- ordinary += cythonize(cythonizable)
78
- ext_modules[:] = ordinary
79
- return lazy(list, init, '__getitem__', '__iter__', '__len__')
80
-
81
- def ext_modules():
82
- extensions = [path.make_ext() for path in sourceinfo.extpaths]
83
- return dict(ext_modules = cythonize(extensions)) if extensions else {}
84
-
85
- sourceinfo = SourceInfo('.')
86
- setuptools.setup(
87
- name = 'pyven',
88
- version = '93',
89
- description = 'Manage development of multiple Python projects',
90
- long_description = long_description(),
91
- long_description_content_type = 'text/markdown',
92
- url = None,
93
- author = 'foyono',
94
- packages = sourceinfo.packages,
95
- py_modules = [],
96
- install_requires = ['aridity>=67', 'diapyr>=27', 'lagoon>=24', 'setuptools>=44.1.1', 'twine>=1.15.0', 'venvpool>=10'],
97
- package_data = {'': ['*.pxd', '*.pyx', '*.pyxbld', '*.arid', '*.aridt']},
98
- 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']},
99
- **ext_modules())
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