partis-pyproj 0.1.3rc4__py3-none-any.whl → 0.1.5__py3-none-any.whl

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 (42) hide show
  1. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/__init__.py +9 -1
  2. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/_legacy_setup.py +11 -11
  3. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/_nonprintable.py +4 -3
  4. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/backend.py +44 -37
  5. partis_pyproj-0.1.5.data/purelib/partis/pyproj/builder/builder.py +351 -0
  6. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/builder/cargo.py +5 -6
  7. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/builder/cmake.py +14 -25
  8. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/builder/meson.py +10 -23
  9. partis_pyproj-0.1.5.data/purelib/partis/pyproj/builder/process.py +42 -0
  10. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/__init__.py +1 -1
  11. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/dist_base.py +75 -86
  12. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/dist_binary.py +6 -24
  13. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/dist_copy.py +7 -18
  14. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/dist_source.py +4 -21
  15. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/dist_targz.py +5 -12
  16. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/dist_file/dist_zip.py +5 -14
  17. partis_pyproj-0.1.5.data/purelib/partis/pyproj/file.py +65 -0
  18. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/legacy.py +3 -2
  19. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/load_module.py +7 -6
  20. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/norms.py +35 -31
  21. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/path/__init__.py +2 -1
  22. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/path/match.py +42 -35
  23. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/path/pattern.py +60 -54
  24. partis_pyproj-0.1.5.data/purelib/partis/pyproj/path/utils.py +94 -0
  25. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/pep.py +36 -35
  26. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/pkginfo.py +7 -16
  27. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/pptoml.py +125 -120
  28. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/pyproj.py +44 -39
  29. partis_pyproj-0.1.5.data/purelib/partis/pyproj/template.py +229 -0
  30. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/validate.py +279 -269
  31. partis_pyproj-0.1.5.dist-info/METADATA +500 -0
  32. partis_pyproj-0.1.5.dist-info/RECORD +37 -0
  33. partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/builder.py +0 -153
  34. partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/process.py +0 -78
  35. partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/path/utils.py +0 -40
  36. partis_pyproj-0.1.3rc4.dist-info/METADATA +0 -51
  37. partis_pyproj-0.1.3rc4.dist-info/RECORD +0 -35
  38. {partis_pyproj-0.1.3rc4.data → partis_pyproj-0.1.5.data}/purelib/partis/pyproj/builder/__init__.py +0 -0
  39. {partis_pyproj-0.1.3rc4.dist-info → partis_pyproj-0.1.5.dist-info}/LICENSE.txt +0 -0
  40. {partis_pyproj-0.1.3rc4.dist-info → partis_pyproj-0.1.5.dist-info}/WHEEL +0 -0
  41. {partis_pyproj-0.1.3rc4.dist-info → partis_pyproj-0.1.5.dist-info}/entry_points.txt +0 -0
  42. {partis_pyproj-0.1.3rc4.dist-info → partis_pyproj-0.1.5.dist-info}/top_level.txt +0 -0
@@ -1,78 +0,0 @@
1
- import os
2
- import os.path as osp
3
- import tempfile
4
- import shutil
5
- import subprocess
6
- from string import Template
7
-
8
- from ..validate import (
9
- validating,
10
- ValidationError,
11
- ValidPathError,
12
- FileOutsideRootError )
13
-
14
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15
- def process(
16
- pyproj,
17
- logger,
18
- options,
19
- work_dir,
20
- src_dir,
21
- build_dir,
22
- prefix,
23
- setup_args,
24
- compile_args,
25
- install_args,
26
- build_clean ):
27
- """Run general three-part set of commands
28
-
29
- Parameters
30
- ----------
31
- pyproj : :class:`PyProjBase <partis.pyproj.pyproj.PyProjBase>`
32
- logger : logging.Logger
33
- options : dict
34
- work_dir: pathlib.Path
35
- src_dir : pathlib.Path
36
- build_dir : pathlib.Path
37
- prefix : pathlib.Path
38
- setup_args : list[str]
39
- compile_args : list[str]
40
- install_args : list[str]
41
- build_clean : bool
42
- """
43
-
44
- namespace = {
45
- **options,
46
- 'work_dir': os.fspath(work_dir),
47
- 'src_dir': os.fspath(src_dir),
48
- 'build_dir': os.fspath(build_dir),
49
- 'prefix': os.fspath(prefix),
50
- **{f"env_{k}": v for k,v in os.environ.items()}}
51
-
52
- # TODO: ensure any paths in setup_args are normalized
53
- if not ( build_dir.exists() and any(build_dir.iterdir()) ):
54
- # only run setup if the build directory does not already exist (or is empty)
55
- setup_args = [ Template(arg).substitute(namespace) for arg in setup_args ]
56
-
57
-
58
- elif not build_clean:
59
- # skip setup if the build directory should be 'clean'
60
- setup_args = list()
61
-
62
- else:
63
- raise ValidPathError(
64
- f"'build_dir' is not empty, remove manually if this is intended or set 'build_clean = false': {build_dir}")
65
-
66
- compile_args = [Template(arg).substitute(namespace) for arg in compile_args]
67
-
68
- install_args = [Template(arg).substitute(namespace) for arg in install_args]
69
-
70
- for cmd in [setup_args, compile_args, install_args]:
71
-
72
- if cmd:
73
- if not shutil.which(cmd[0]):
74
- raise ValueError(f"The program not found: {setup_args[0]}")
75
-
76
- logger.info(f"Running command: {' '.join(cmd)}")
77
- subprocess.check_call(cmd)
78
-
@@ -1,40 +0,0 @@
1
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
- class PathError(ValueError):
3
- pass
4
-
5
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6
- def _subdir(_start, _path):
7
-
8
- n = len(_start)
9
-
10
- if len(_path) < n or _path[:n] != _start:
11
- return None
12
-
13
- return _path[n:]
14
-
15
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16
- def subdir(start, path, check = True):
17
- """Relative path, restricted to sub-directories.
18
-
19
- Parameters
20
- ----------
21
- start : PurePath
22
- Starting directory.
23
- path : PurePath
24
- Directory to compute relative path to, *must* be a sub-directory of `start`.
25
-
26
- Returns
27
- -------
28
- rpath : PurePath
29
- Relative path from `start` to `path`.
30
- """
31
-
32
- _rpath = _subdir(start.parts, path.parts)
33
-
34
- if _rpath is None:
35
- if check:
36
- raise PathError(f"Not a subdirectory of {start}: {path}")
37
-
38
- return None
39
-
40
- return type(path)(*_rpath)
@@ -1,51 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: partis-pyproj
3
- Version: 0.1.3rc4
4
- Requires-Python: >=3.6.2
5
- Author-email: "Nanohmics Inc." <software.support@nanohmics.com>
6
- Maintainer-email: "Nanohmics Inc." <software.support@nanohmics.com>
7
- Summary: Minimal set of Python project utilities (PEP-517/621)
8
- License-File: LICENSE.txt
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Topic :: Software Development :: Build Tools
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Operating System :: POSIX :: Linux
13
- Classifier: License :: OSI Approved :: BSD License
14
- Classifier: Development Status :: 4 - Beta
15
- Classifier: Operating System :: Microsoft :: Windows
16
- Classifier: Programming Language :: Python
17
- Provides-Extra: meson
18
- Provides-Extra: cmake
19
- Provides-Extra: doc
20
- Provides-Extra: test
21
- Provides-Extra: cov
22
- Provides-Extra: lint
23
- Requires-Dist: packaging==21.3
24
- Requires-Dist: tomli>=1.2.3
25
- Requires-Dist: importlib_metadata; python_version < "3.8"
26
- Requires-Dist: meson>=0.61.3; extra == "meson"
27
- Requires-Dist: ninja>=1.10.2.3; extra == "meson"
28
- Requires-Dist: ninja>=1.10.2.3; extra == "cmake"
29
- Requires-Dist: cmake>=3.24.3; extra == "cmake"
30
- Requires-Dist: partis-utils[sphinx]>=0.1.3rc3; extra == "doc"
31
- Requires-Dist: cmake>=3.24.3; extra == "test"
32
- Requires-Dist: pytest>=6.2.5; extra == "test"
33
- Requires-Dist: numpy; extra == "test"
34
- Requires-Dist: meson>=0.61.3; extra == "test"
35
- Requires-Dist: ninja>=1.10.2.3; extra == "test"
36
- Requires-Dist: pytest-cov>=3.0.0; extra == "test"
37
- Requires-Dist: coverage[toml]>=6.2; extra == "test"
38
- Requires-Dist: tomli>=1.2.3; extra == "test"
39
- Requires-Dist: Cython>=0.29.18; extra == "test"
40
- Requires-Dist: build>=0.7.0; extra == "test"
41
- Requires-Dist: pytest_mock>=3.6.1; extra == "test"
42
- Requires-Dist: nox>=2021.10.1; extra == "test"
43
- Requires-Dist: pip>=18.1; extra == "test"
44
- Requires-Dist: coverage[toml]>=6.2; extra == "cov"
45
- Requires-Dist: pyflakes==2.4.0; extra == "lint"
46
- Description-Content-Type: text/x-rst
47
-
48
- The ``partis.pyproj`` package aims to be very simple and
49
- transparent implementation of a PEP-517 build back-end.
50
-
51
- https://nanohmics.bitbucket.io/doc/partis/pyproj
@@ -1,35 +0,0 @@
1
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/__init__.py,sha256=HBnvC3dycTnUD8bkbEBj9fRXwvJCp87wpAk1Q_Ijbq0,1432
2
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/norms.py,sha256=VwnwnysTgTevdkGcQhCvn41rnjt67t6f8v7_anGuR5Q,10862
3
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/pep.py,sha256=CrvlQslSQqPvQ3_5hOzzkrRhXMgZh21kviIm0yXpssM,32658
4
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/__init__.py,sha256=1GSva5IvHTDozdjR9G7g30zKIBshciBYHIfVodjTeLI,133
5
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/builder.py,sha256=H3fotq7j7ckl_1Zljp4_DBrChTpD5MguQvLxQSs4X-c,4654
6
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/cargo.py,sha256=y-CUsuZ29X4tAu9cj2MzsSje1B3DUUBeXZDheWXzoAo,1187
7
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/cmake.py,sha256=lbcodOHKL_8OlZS6KOFnzRSAWkhIe-Rya6GJPZ2syA0,2145
8
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/meson.py,sha256=lxLKXF-LbZlM6cAoi1Zf-GNAh25jJRufEZr2tJAZ5pM,2208
9
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/builder/process.py,sha256=Kx9fSVN-bXl6AHqjzYxRpy372DvjuT2kmqGn9UVnUQE,2018
10
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/load_module.py,sha256=WYDcGKBrIWw_bO_aMW34fW3gt7x-T4O_TpYeu6_5V1k,4305
11
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/_legacy_setup.py,sha256=UwiHAzj5Ka960u_j1I7lYChjMxtKM2fHsOWhWNwGfy8,5306
12
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/_nonprintable.py,sha256=plAzStakZ3BgjntpzGqRYSdT99WIMXTwv6Q5L6DMHR8,1829
13
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/path/__init__.py,sha256=pypqIo4tZ8YVV3W33sC2hagHek_Us4FpXwwOnQJu3vA,226
14
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/path/match.py,sha256=bFX8oEDPCoTRWkCOAtMw1PBQmI3LpRbA97uBQ4vcf0M,11677
15
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/path/pattern.py,sha256=DpJl-vdnn30QZdikTyg4f4nbdHk6VAxcGhHpYjuCdyg,15634
16
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/path/utils.py,sha256=OlUjU7DUGf2UaamrjHCKxCTm2Zor9NuzjGOJtRVypjU,950
17
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/validate.py,sha256=ljtv75OAQdjmRPCoW5iCXq2-CG42oDDYmV7xecmXF-U,32324
18
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/pkginfo.py,sha256=7O-EAeKyH7t222-NBnMNfDX8cmWqAGMfq-plMvz7bJA,15250
19
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/dist_targz.py,sha256=neDHh4PVXcpycwYtgHRTgk8dO9WUbS1cguZuaO84cW0,3922
20
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/__init__.py,sha256=_NEMWNR9Z0aa1knCmKmhSuQOK5aP8Lr1Bc1868eUt58,379
21
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/dist_zip.py,sha256=wWoLE7JJ2jicq5OFFG0EckHhi4KEshkEyTfDgdAhl7c,3887
22
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/dist_binary.py,sha256=e2Tuzl1vvzaG3bVB4lleHH3PPITPFGJUvIYqxKe5g9s,7881
23
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/dist_base.py,sha256=vJEbMWZf_X9b65ZCSun1kIUZbSsNURZa10wzzRZIz-E,12086
24
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/dist_source.py,sha256=x7nUgArbCIz1tr-ZQUknyhcG36hrv_AX71_RV870fnM,4503
25
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/dist_file/dist_copy.py,sha256=urzbyCVf4BelApO7T7kQ2sOqOOJxTNBEZfsQ73qz5XM,3627
26
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/legacy.py,sha256=tgOSmt7sfxTT0Ue9md6pRzDLv3kIPfJHuB8XgKHoQsA,1704
27
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/backend.py,sha256=yta_iZKj_-gHR_d34ycjGWzeVT1a4E--efD0esFx0rU,6717
28
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/pyproj.py,sha256=GuDFDi_65YtL1pqY9sP5M2F9rL9xD_6TRgMIBdQJjE8,12220
29
- partis_pyproj-0.1.3rc4.data/purelib/partis/pyproj/pptoml.py,sha256=0NJ69Vu7-dOisE61OjRHWenJAc7HDrP7xoWJBIjL3qw,13446
30
- partis_pyproj-0.1.3rc4.dist-info/METADATA,sha256=45sPnadoodUGiRswby3D3wd8dPwMBvFmmyCgr5wTNSQ,2092
31
- partis_pyproj-0.1.3rc4.dist-info/LICENSE.txt,sha256=6LYtpan0H8F0reCrEa1ZUf_Nr9Vu93A3bqunX2J5Et0,3320
32
- partis_pyproj-0.1.3rc4.dist-info/top_level.txt,sha256=T72LF-bUK7nMDf1GQgbzvgZ2YrJElwwRd9h7HwVQBIQ,6
33
- partis_pyproj-0.1.3rc4.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- partis_pyproj-0.1.3rc4.dist-info/WHEEL,sha256=4YeLUbbRU8D0xzIlG3rm8IFLwHKcY8YaY_wiNxswKJg,126
35
- partis_pyproj-0.1.3rc4.dist-info/RECORD,,