nmk-python 0.17.0__py3-none-any.whl → 1.0.0__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.
nmk_python/build.py CHANGED
@@ -4,6 +4,7 @@ Python package build module
4
4
 
5
5
  import shutil
6
6
  import sys
7
+ from logging import Logger
7
8
  from pathlib import Path
8
9
 
9
10
  from nmk.model.builder import NmkTaskBuilder
@@ -15,6 +16,15 @@ from tomlkit import loads
15
16
  from tomlkit.toml_file import TOMLFile
16
17
 
17
18
 
19
+ # Install filter for Windows
20
+ def _can_install(name: str, logger: Logger) -> bool:
21
+ # On Windows, refuse to install nmk package while running nmk (wont' work)
22
+ if is_windows() and name == "nmk":
23
+ logger.warning("Can't install nmk while running nmk!")
24
+ return False
25
+ return True
26
+
27
+
18
28
  class PackageBuilder(NmkTaskBuilder):
19
29
  """
20
30
  Python package builder
@@ -120,14 +130,13 @@ class Installer(VenvUpdateBuilder):
120
130
  :param to_remove: stamp file to be removed
121
131
  """
122
132
 
123
- # On Windows, refuse to install nmk package while running nmk (wont' work)
124
- if is_windows() and name == "nmk":
125
- self.logger.warning("Can't install nmk while running nmk!")
126
- else:
133
+ # Check if wheel can be installed
134
+ if _can_install(name, self.logger):
135
+ # Install wheel in current venv
127
136
  super().build(pip_args)
128
137
 
129
- # Remove stamp file
130
- Path(to_remove).unlink(missing_ok=True)
138
+ # Remove stamp file
139
+ Path(to_remove).unlink(missing_ok=True)
131
140
 
132
141
 
133
142
  class Uninstaller(NmkTaskBuilder):
@@ -160,8 +169,10 @@ class EditableBuilder(NmkTaskBuilder):
160
169
  :param pip_args: pip command line arguments
161
170
  """
162
171
 
163
- # Delegate to pip
164
- run_pip(["install", "-e", "."], logger=self.logger, extra_args=pip_args)
172
+ # Check if project can be installed in editable mode
173
+ if _can_install(self.model.config["pythonPackage"].value, self.logger):
174
+ # Delegate to pip
175
+ run_pip(["install", "-e", "."], logger=self.logger, extra_args=pip_args)
165
176
 
166
- # Touch stamp file
167
- self.main_output.touch()
177
+ # Touch stamp file
178
+ self.main_output.touch()
nmk_python/build.yml CHANGED
@@ -24,9 +24,6 @@ config:
24
24
  # Python package dependencies (also contributed to venv)
25
25
  pythonPackageRequirements: []
26
26
  venvPkgDeps:
27
- - setuptools
28
- - wheel
29
- - build
30
27
  - ${pythonPackageRequirements}
31
28
 
32
29
  # Extra (external) resources to be bundled in built python wheel
nmk_python/ruff.yml CHANGED
@@ -1,9 +1,5 @@
1
1
  config:
2
2
 
3
- # Just needs ruff
4
- venvPkgDeps:
5
- - ruff
6
-
7
3
  # Max line length
8
4
  pythonLineLength: 160
9
5
 
nmk_python/tests.yml CHANGED
@@ -3,12 +3,6 @@ config:
3
3
  pythonProjectFileFragments:
4
4
  - ${BASEDIR}/templates/pytest.toml.jinja
5
5
 
6
- # Tests related venv dependencies
7
- venvPkgDeps:
8
- - pytest-xdist
9
- - pytest-cov
10
- - pytest-multilog
11
-
12
6
  # Coverage outputs
13
7
  pythonCoverageHtmlReport: ${outputDir}/coverage-report
14
8
  pythonCoverageXmlReport: ${outputDir}/coverage.xml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nmk-python
3
- Version: 0.17.0
3
+ Version: 1.0.0
4
4
  Summary: Python plugin for nmk build system
5
5
  Author: The dynod project
6
6
  Maintainer: The dynod project
@@ -16,9 +16,16 @@ Classifier: Programming Language :: Python :: 3.13
16
16
  Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: nmk-base>=0.24.0
19
+ Requires-Dist: nmk-base>=1.0.1
20
20
  Requires-Dist: Jinja2
21
21
  Requires-Dist: tomlkit
22
+ Requires-Dist: setuptools
23
+ Requires-Dist: wheel
24
+ Requires-Dist: build
25
+ Requires-Dist: ruff
26
+ Requires-Dist: pytest-xdist
27
+ Requires-Dist: pytest-cov
28
+ Requires-Dist: pytest-multilog
22
29
 
23
30
  # nmk-python
24
31
  Python plugin for nmk build system
@@ -1,16 +1,16 @@
1
1
  nmk_python/__init__.py,sha256=EouCWXbAeObby1vOCx0Vx_WaGC2fEEFDMCen3JZt4TU,446
2
2
  nmk_python/badges.yml,sha256=LzElZecCXKxdF-oPkvIwfnbQlOcAM_zUj6MelClmAug,749
3
- nmk_python/build.py,sha256=O7BLqbxKtvjVbMb9cr45ViOoRRcp_9p5Nd8DwViMiTI,5863
4
- nmk_python/build.yml,sha256=miakmtxwHhtFXK257saotRhtgjGbKhq8F3OPAADZ6EA,4011
3
+ nmk_python/build.py,sha256=uTOaj-iPOrJdoynXqdnN-2OlXXas_S45YjgIaC_n2Ok,6275
4
+ nmk_python/build.yml,sha256=PeT-tGKrFDOUMpC0-mnqIw3FxVIRltP35IsP0DQCLSM,3958
5
5
  nmk_python/doc.yml,sha256=12amAlYylH7JAHaqBIOoEZ_LrXY_bPNKuHrrwUkIj8w,932
6
6
  nmk_python/files.py,sha256=gtPf6ldR5F4oGsAdzFnEIbI9MqqvF3z5JQnyONZmLmk,1863
7
7
  nmk_python/files.yml,sha256=-vGjogdulwsfdKVEUa5RARYDKxF3m9RmHKFnIhaT3_k,780
8
8
  nmk_python/plugin.yml,sha256=hi7osXyIwpHgJAsww5mhOA6emxhzgitDF8cOsvyY29Y,1068
9
9
  nmk_python/project.yml,sha256=sRIMvKkasrYlIvOo3DsVyNM_sgID_sHVgZg_bSIqtfw,975
10
10
  nmk_python/ruff.py,sha256=tfqC66NEB3P1FID1qzP-Ba3hafF02A1I9GIeruGUW2U,1058
11
- nmk_python/ruff.yml,sha256=VIlH52dc4m-dgsm-SFuD4-AK6knke1-GuJSJQvVsXWE,1863
11
+ nmk_python/ruff.yml,sha256=09ackKHfT9oXKqIniYUehFkyW2DUxlHl5Ak5x2tlvQQ,1808
12
12
  nmk_python/tests.py,sha256=8kRKP3dT2Thi5W5sCQSQOPXkV1D9C7tde3QYySo6G2c,1212
13
- nmk_python/tests.yml,sha256=agb5QJSPIdjfzalQbvhOzoiX_Ijw_Zj1KxzNZBQz--w,1664
13
+ nmk_python/tests.yml,sha256=wQusYK1bxSl87zWFQy5lJcrkcAz4pMEZT9Vt6o2K5Vs,1538
14
14
  nmk_python/version.py,sha256=fLpOWdujYwlJB7XhWaOGCTeg3gQaClk2YHoRkkW64dE,3109
15
15
  nmk_python/version.yml,sha256=jU0b6JIBVWl5JZJmRBRiqT_pIRyVdddwnH5U5jV1VJ8,904
16
16
  nmk_python/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -19,8 +19,8 @@ nmk_python/templates/pytest.toml.jinja,sha256=zQ3SRWnF23Omxm7zInE54j0l3OyjXSOn5p
19
19
  nmk_python/templates/python-settings.json.jinja,sha256=-6J1tybWEzChxlDqu4tp9BMWxbYD8HpztGs9G8LkC_w,877
20
20
  nmk_python/templates/python-test-debug-launch.json.jinja,sha256=J_xju2EpHNXvgvqBxlf99p7g-ZMh3xE-_2r7o_57gpU,364
21
21
  nmk_python/templates/ruff.toml.jinja,sha256=DTHe1ixK1SBY8d2xBCfkGz89HzjAoMO7Ogs12AY1i4Y,346
22
- nmk_python-0.17.0.dist-info/LICENSE,sha256=PROo9EW7wP6jmSr_90OluItAsIB411b_CAqEBioMKpI,1074
23
- nmk_python-0.17.0.dist-info/METADATA,sha256=Mhi9Uk_UPU7kc7HlvdBtoe_TQa814aJ3uac-YiWCXJA,2947
24
- nmk_python-0.17.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
25
- nmk_python-0.17.0.dist-info/top_level.txt,sha256=MCb5w_hoOZ0kk3Dajxrd9Pz6lZ3pyuS6TQCRA3vddTo,11
26
- nmk_python-0.17.0.dist-info/RECORD,,
22
+ nmk_python-1.0.0.dist-info/LICENSE,sha256=PROo9EW7wP6jmSr_90OluItAsIB411b_CAqEBioMKpI,1074
23
+ nmk_python-1.0.0.dist-info/METADATA,sha256=XXqn3r1ZNQszI90v1JEcB1oqplVsDO1RVz8IyR4eKUs,3118
24
+ nmk_python-1.0.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
25
+ nmk_python-1.0.0.dist-info/top_level.txt,sha256=MCb5w_hoOZ0kk3Dajxrd9Pz6lZ3pyuS6TQCRA3vddTo,11
26
+ nmk_python-1.0.0.dist-info/RECORD,,