ciel 2.1.2__tar.gz → 2.1.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ciel
3
- Version: 2.1.2
3
+ Version: 2.1.4
4
4
  Summary: An PDK builder/version manager for PDKs in the open_pdks format
5
5
  Home-page: https://github.com/fossi-foundation/ciel
6
6
  License: Apache-2.0
@@ -31,7 +31,7 @@ opt = partial(click.option, show_default=True)
31
31
 
32
32
 
33
33
  class VersionArgument(click.Argument):
34
- def make_metavar(self):
34
+ def make_metavar(self, ctx: Optional[click.Context] = None):
35
35
  return "<VERSION>"
36
36
 
37
37
  def set_tool_metadata_file_path(
@@ -100,7 +100,8 @@ def opt_pdk_root(function: Callable):
100
100
  "--pdk",
101
101
  cls=PDKOption,
102
102
  required=True,
103
- help="A valid PDK family or variant (the latter of which is resolved to a family).",
103
+ envvar=["PDK_FAMILY", "PDK"],
104
+ help="A valid PDK family or variant (the latter of which is resolved to a family). If the environment PDK_FAMILY or PDK are set, they are used as secondary sources for this value.",
104
105
  )(function)
105
106
  function = opt(
106
107
  "--pdk-root",
@@ -18,6 +18,7 @@
18
18
  import os
19
19
  import shutil
20
20
  import pathlib
21
+ import warnings
21
22
  from datetime import datetime
22
23
  from dataclasses import dataclass
23
24
  from typing import Optional, List
@@ -82,13 +83,23 @@ def resolve_pdk_family(selector: Optional[str]):
82
83
  If selector is None, the PDK_FAMILY and PDK environment variables are
83
84
  used as fallbacks. If all are None, the function will simply return None.
84
85
 
86
+ Starting Ciel 3.0.0, supplying None will no longer work and the selector
87
+ will be a string.
88
+
85
89
  If the selector is invalid, a ValueError will be raised. "ihp_sg13g2"
86
90
  will resolve to "ihp-sg13g2" however for some semblance of backwards
87
91
  compatibility with previous versions of Ciel/Volare.
88
92
  """
89
- selector = selector or os.getenv("PDK_FAMILY") or os.getenv("PDK")
90
93
  if selector is None:
91
- return None # Let click validator handle it
94
+ warnings.warn(
95
+ "Passing None to resolve_pdk_family is deprecated and will be removed in Ciel 3.0.0. Please resolve any environment variables manually.",
96
+ DeprecationWarning,
97
+ stacklevel=2,
98
+ )
99
+ if environment_specified_pdk := os.getenv("PDK_FAMILY") or os.getenv("PDK"):
100
+ selector = environment_specified_pdk
101
+ if selector is None:
102
+ return None
92
103
 
93
104
  if selector == "ihp_sg13g2":
94
105
  selector = "ihp-sg13g2"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ciel"
3
- version = "2.1.2"
3
+ version = "2.1.4"
4
4
  description = "An PDK builder/version manager for PDKs in the open_pdks format"
5
5
  authors = ["Mohamed Gaber <me@donn.website>", "Efabless Corporation"]
6
6
  readme = "Readme.md"
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