pyven 98__tar.gz → 100__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-98 → pyven-100}/PKG-INFO +2 -2
- {pyven-98 → pyven-100}/README.md +1 -1
- pyven-100/pyven/README.md.aridt +42 -0
- {pyven-98 → pyven-100}/pyven/checks.py +16 -8
- pyven-100/pyven/minreqs.py +15 -0
- {pyven-98 → pyven-100}/pyven/release.py +0 -5
- {pyven-98 → pyven-100}/pyven.egg-info/PKG-INFO +2 -2
- {pyven-98 → pyven-100}/setup.py +1 -1
- pyven-98/pyven/README.md.aridt +0 -30
- pyven-98/pyven/minreqs.py +0 -10
- {pyven-98 → pyven-100}/pyven/__init__.py +0 -0
- {pyven-98 → pyven-100}/pyven/bdist.py +0 -0
- {pyven-98 → pyven-100}/pyven/divcheck.py +0 -0
- {pyven-98 → pyven-100}/pyven/drmake.py +0 -0
- {pyven-98 → pyven-100}/pyven/execcheck.py +0 -0
- {pyven-98 → pyven-100}/pyven/files.py +0 -0
- {pyven-98 → pyven-100}/pyven/functions.py +0 -0
- {pyven-98 → pyven-100}/pyven/launch.py +0 -0
- {pyven-98 → pyven-100}/pyven/licheck.py +0 -0
- {pyven-98 → pyven-100}/pyven/mainmodules.py +0 -0
- {pyven-98 → pyven-100}/pyven/nlcheck.py +0 -0
- {pyven-98 → pyven-100}/pyven/patchpolicy.py +0 -0
- {pyven-98 → pyven-100}/pyven/pipify.py +0 -0
- {pyven-98 → pyven-100}/pyven/projectinfo.arid +0 -0
- {pyven-98 → pyven-100}/pyven/projectinfo.py +0 -0
- {pyven-98 → pyven-100}/pyven/pyproject.toml.aridt +0 -0
- {pyven-98 → pyven-100}/pyven/release.arid +0 -0
- {pyven-98 → pyven-100}/pyven/setup.cfg.aridt +0 -0
- {pyven-98 → pyven-100}/pyven/setup.py.aridt +0 -0
- {pyven-98 → pyven-100}/pyven/setuptools.arid +0 -0
- {pyven-98 → pyven-100}/pyven/sourceinfo.py +0 -0
- {pyven-98 → pyven-100}/pyven/tasks.py +0 -0
- {pyven-98 → pyven-100}/pyven/tests/__init__.py +0 -0
- {pyven-98 → pyven-100}/pyven/tryinstall.py +0 -0
- {pyven-98 → pyven-100}/pyven/util.py +0 -0
- {pyven-98 → pyven-100}/pyven.egg-info/SOURCES.txt +0 -0
- {pyven-98 → pyven-100}/pyven.egg-info/dependency_links.txt +0 -0
- {pyven-98 → pyven-100}/pyven.egg-info/entry_points.txt +0 -0
- {pyven-98 → pyven-100}/pyven.egg-info/requires.txt +0 -0
- {pyven-98 → pyven-100}/pyven.egg-info/top_level.txt +0 -0
- {pyven-98 → pyven-100}/setup.cfg +0 -0
{pyven-98 → pyven-100}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyven
|
|
3
|
-
Version:
|
|
3
|
+
Version: 100
|
|
4
4
|
Summary: Manage development of multiple Python projects
|
|
5
5
|
Home-page: https://pypi.org/project/pyven/
|
|
6
6
|
Author: Homsar
|
|
@@ -26,7 +26,7 @@ Build a Docker image with automatic tag.
|
|
|
26
26
|
Run project using a suitable venv from the pool.
|
|
27
27
|
|
|
28
28
|
### minreqs
|
|
29
|
-
|
|
29
|
+
Pin requires to their minimum allowed versions.
|
|
30
30
|
|
|
31
31
|
### pipify
|
|
32
32
|
Generate setuptools files for a project.arid project.
|
{pyven-98 → pyven-100}/README.md
RENAMED
|
@@ -10,7 +10,7 @@ Build a Docker image with automatic tag.
|
|
|
10
10
|
Run project using a suitable venv from the pool.
|
|
11
11
|
|
|
12
12
|
### minreqs
|
|
13
|
-
|
|
13
|
+
Pin requires to their minimum allowed versions.
|
|
14
14
|
|
|
15
15
|
### pipify
|
|
16
16
|
Generate setuptools files for a project.arid project.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# $(name)
|
|
2
|
+
$(tagline)$try($.($(verbose_blank)
|
|
3
|
+
|
|
4
|
+
## Install
|
|
5
|
+
These are generic installation instructions.
|
|
6
|
+
|
|
7
|
+
### To use, disposably
|
|
8
|
+
Install the current release from PyPI to a virtual environment:
|
|
9
|
+
```
|
|
10
|
+
python$first$(pyversions) -m venv venvname
|
|
11
|
+
venvname/bin/pip install -U pip
|
|
12
|
+
venvname/bin/pip install $(name)
|
|
13
|
+
. venvname/bin/activate
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### To use, permanently
|
|
17
|
+
```
|
|
18
|
+
pip$first$(pyversions) install --user $(name)
|
|
19
|
+
```
|
|
20
|
+
See `~/.local/bin` for executables.
|
|
21
|
+
|
|
22
|
+
### To develop
|
|
23
|
+
First install venvpool to get the `motivate` command:
|
|
24
|
+
```
|
|
25
|
+
pip3 install --user venvpool
|
|
26
|
+
```
|
|
27
|
+
Get codebase and install executables:
|
|
28
|
+
```
|
|
29
|
+
git clone git@github.com:$(github account)/$(name).git
|
|
30
|
+
motivate $(name)
|
|
31
|
+
```
|
|
32
|
+
Requirements will be satisfied just in time, using sibling projects with matching .egg-info if any.) $.())$try($join$list$first$map($(commands) $.[
|
|
33
|
+
|
|
34
|
+
## Commands]) $.())$join$map($(commands) $.[
|
|
35
|
+
|
|
36
|
+
### $(name)
|
|
37
|
+
$(doc)])$try($.(
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
$(pydoc)$hole$.(
|
|
42
|
+
)) $.())
|
|
@@ -10,6 +10,7 @@ from diapyr.util import singleton
|
|
|
10
10
|
from itertools import chain
|
|
11
11
|
from lagoon import diff
|
|
12
12
|
from lagoon.program import NOEOL, partial
|
|
13
|
+
from pathlib import Path
|
|
13
14
|
from setuptools import find_packages
|
|
14
15
|
from shutil import copytree, ignore_patterns
|
|
15
16
|
from tempfile import NamedTemporaryFile
|
|
@@ -49,7 +50,7 @@ class EveryVersion:
|
|
|
49
50
|
self.transient = transient
|
|
50
51
|
|
|
51
52
|
def allchecks(self):
|
|
52
|
-
for check in self.licheck, self.nlcheck, self.execcheck, self.divcheck, self.pyflakes, self.nose, self.readme, self.github, self.linktree:
|
|
53
|
+
for check in self.licheck, self.nlcheck, self.execcheck, self.reqscheck, self.divcheck, self.pyflakes, self.nose, self.readme, self.github, self.linktree:
|
|
53
54
|
check()
|
|
54
55
|
|
|
55
56
|
def licheck(self):
|
|
@@ -69,6 +70,14 @@ class EveryVersion:
|
|
|
69
70
|
from .execcheck import execcheck
|
|
70
71
|
_runcheck('*', execcheck, self.files.pypaths)
|
|
71
72
|
|
|
73
|
+
def reqscheck(self):
|
|
74
|
+
def reqscheck():
|
|
75
|
+
expected = ''.join(f"{r}\n" for r in self.info.allrequires)
|
|
76
|
+
if not expected:
|
|
77
|
+
expected = '# This file blank.\n'
|
|
78
|
+
assert expected == Path(self.info.projectdir, 'requirements.txt').read_text()
|
|
79
|
+
_runcheck('*', reqscheck)
|
|
80
|
+
|
|
72
81
|
def divcheck(self):
|
|
73
82
|
from . import divcheck
|
|
74
83
|
scriptpath = divcheck.__file__
|
|
@@ -225,22 +234,21 @@ class Container:
|
|
|
225
234
|
|
|
226
235
|
def inituser(self):
|
|
227
236
|
from lagoon import docker
|
|
228
|
-
docker(
|
|
229
|
-
docker(
|
|
230
|
-
docker(
|
|
237
|
+
docker.exec[print](self.container, 'groupadd', '-g', os.stat('/var/run/docker.sock').st_gid, 'docker')
|
|
238
|
+
docker.exec[print](self.container, 'groupadd', '-g', self.gid, 'pyvengroup')
|
|
239
|
+
docker.exec[print](self.container, 'useradd', '-g', self.gid, '-G', 'docker', '-u', self.uid, '-m', 'pyvenuser')
|
|
231
240
|
|
|
232
241
|
def initapt(self):
|
|
233
242
|
from lagoon import docker
|
|
234
|
-
initapt(docker[partial](
|
|
243
|
+
initapt(docker.exec[partial, print](self.container))
|
|
235
244
|
|
|
236
245
|
def install(self, args):
|
|
237
|
-
from lagoon import docker
|
|
238
246
|
if args:
|
|
239
|
-
|
|
247
|
+
self.call(['pip', 'install', '--user', *args], check = True)
|
|
240
248
|
|
|
241
249
|
def call(self, args, check = False, root = False):
|
|
242
250
|
from lagoon import docker
|
|
243
|
-
return docker('
|
|
251
|
+
return docker.exec[print]('-w', self.workdir, self.container, *[] if root else ['sudo', '-u', 'pyvenuser', 'PATH=/home/pyvenuser/.local/bin:/usr/local/bin:/usr/bin:/bin', 'env'], *args, check = check)
|
|
244
252
|
|
|
245
253
|
def cp(self, src, dest):
|
|
246
254
|
from lagoon import docker
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'Pin requires to their minimum allowed versions.'
|
|
2
|
+
from .projectinfo import ProjectInfo
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from venvpool import initlogging
|
|
5
|
+
|
|
6
|
+
def main():
|
|
7
|
+
initlogging()
|
|
8
|
+
info = ProjectInfo.seek('.')
|
|
9
|
+
minreqs = [r.minstr() for r in info.parsedrequires()]
|
|
10
|
+
with Path(info.projectdir, 'project.arid').open('a') as f:
|
|
11
|
+
print(f"requires = $list({' '.join(minreqs)})", file = f)
|
|
12
|
+
Path(info.projectdir, 'requirements.txt').write_text(''.join(f"{r}\n" for r in minreqs) if minreqs else '# This file blank.\n')
|
|
13
|
+
|
|
14
|
+
if '__main__' == __name__:
|
|
15
|
+
main()
|
|
@@ -16,7 +16,6 @@ import lagoon, logging, os, re, shutil, sys, sysconfig
|
|
|
16
16
|
|
|
17
17
|
log = logging.getLogger(__name__)
|
|
18
18
|
distrelpath = 'dist'
|
|
19
|
-
targetremote = 'origin'
|
|
20
19
|
|
|
21
20
|
class Arch:
|
|
22
21
|
|
|
@@ -89,10 +88,6 @@ def main():
|
|
|
89
88
|
if git.status.__porcelain():
|
|
90
89
|
raise Exception('Uncommitted changes!')
|
|
91
90
|
log.debug('No uncommitted changes.')
|
|
92
|
-
remotename, _ = git.rev_parse.__abbrev_ref('@{u}').split('/')
|
|
93
|
-
if targetremote != remotename:
|
|
94
|
-
raise Exception("Current branch must track some %s branch." % targetremote)
|
|
95
|
-
log.debug("Good remote: %s", remotename)
|
|
96
91
|
with TemporaryDirectory() as tempdir:
|
|
97
92
|
copydir = os.path.join(tempdir, os.path.basename(os.path.abspath(info.projectdir)))
|
|
98
93
|
log.info("Copying project to: %s", copydir)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyven
|
|
3
|
-
Version:
|
|
3
|
+
Version: 100
|
|
4
4
|
Summary: Manage development of multiple Python projects
|
|
5
5
|
Home-page: https://pypi.org/project/pyven/
|
|
6
6
|
Author: Homsar
|
|
@@ -26,7 +26,7 @@ Build a Docker image with automatic tag.
|
|
|
26
26
|
Run project using a suitable venv from the pool.
|
|
27
27
|
|
|
28
28
|
### minreqs
|
|
29
|
-
|
|
29
|
+
Pin requires to their minimum allowed versions.
|
|
30
30
|
|
|
31
31
|
### pipify
|
|
32
32
|
Generate setuptools files for a project.arid project.
|
{pyven-98 → pyven-100}/setup.py
RENAMED
|
@@ -44,7 +44,7 @@ class SourceInfo:
|
|
|
44
44
|
sourceinfo = SourceInfo('.')
|
|
45
45
|
setup(
|
|
46
46
|
name = 'pyven',
|
|
47
|
-
version = '
|
|
47
|
+
version = '100',
|
|
48
48
|
description = 'Manage development of multiple Python projects',
|
|
49
49
|
long_description = long_description(),
|
|
50
50
|
long_description_content_type = 'text/markdown',
|
pyven-98/pyven/README.md.aridt
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# $(name)
|
|
2
|
-
$(tagline)$try($.($(verbose_blank)
|
|
3
|
-
|
|
4
|
-
## Install
|
|
5
|
-
These are generic installation instructions.
|
|
6
|
-
|
|
7
|
-
### To use, permanently
|
|
8
|
-
The quickest way to get started is to install the current release from PyPI:
|
|
9
|
-
```
|
|
10
|
-
pip$first$(pyversions) install --user $(name)
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### To use, temporarily
|
|
14
|
-
If you prefer to keep .local clean, install to a virtualenv:
|
|
15
|
-
```
|
|
16
|
-
python$first$(pyversions) -m venv venvname
|
|
17
|
-
venvname/bin/pip install -U pip
|
|
18
|
-
venvname/bin/pip install $(name)
|
|
19
|
-
. venvname/bin/activate
|
|
20
|
-
```) $.())$try($join$list$first$map($(commands) $.[
|
|
21
|
-
|
|
22
|
-
## Commands]) $.())$join$map($(commands) $.[
|
|
23
|
-
|
|
24
|
-
### $(name)
|
|
25
|
-
$(doc)])$try($.(
|
|
26
|
-
|
|
27
|
-
## API
|
|
28
|
-
|
|
29
|
-
$(pydoc)$hole$.(
|
|
30
|
-
)) $.())
|
pyven-98/pyven/minreqs.py
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'Print project.arid snippet pinning requires to their minimum allowed versions.'
|
|
2
|
-
from .projectinfo import ProjectInfo
|
|
3
|
-
from venvpool import initlogging
|
|
4
|
-
|
|
5
|
-
def main():
|
|
6
|
-
initlogging()
|
|
7
|
-
print("requires = $list(%s)" % ' '.join(r.minstr() for r in ProjectInfo.seek('.').parsedrequires()))
|
|
8
|
-
|
|
9
|
-
if '__main__' == __name__:
|
|
10
|
-
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
|
{pyven-98 → pyven-100}/setup.cfg
RENAMED
|
File without changes
|