| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,13 @@ | |||
| 1 | 1 | # Changelog | |
| 2 | 2 | ||
| 3 | + ## [0.20.4](https://github.com/nodejs/gyp-next/compare/v0.20.3...v0.20.4) (2025-08-25) | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + ### Bug Fixes | ||
| 7 | + | ||
| 8 | + * **cli:** remove duplicate usage ([#308](https://github.com/nodejs/gyp-next/issues/308)) ([0996f60](https://github.com/nodejs/gyp-next/commit/0996f60e9bc83ec9d7b31e39bebd23f8dc990130)) | ||
| 9 | + * **docs:** Add running gyp via uv ([#306](https://github.com/nodejs/gyp-next/issues/306)) ([0e43f61](https://github.com/nodejs/gyp-next/commit/0e43f61da8154f9b460ccba9ce4c0a25d2383ac4)) | ||
| 10 | + | ||
| 3 | 11 | ## [0.20.3](https://github.com/nodejs/gyp-next/compare/v0.20.2...v0.20.3) (2025-08-20) | |
| 4 | 12 | ||
| 5 | 13 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,8 +6,9 @@ Documents are available at [`./docs`](./docs). | |||
| 6 | 6 | __gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command: | |
| 7 | 7 | * `python3 -m pip install gyp-next` | |
| 8 | 8 | ||
| 9 | - When used as a command line utility, __gyp-next__ can also be installed with [pipx](https://pypa.github.io/pipx): | ||
| 10 | - * `pipx install gyp-next` | ||
| 9 | + When used as a command line utility, __gyp-next__ can also be installed with [pipx](https://pypa.github.io/pipx) or [uv](https://docs.astral.sh/uv): | ||
| 10 | + * `pipx install gyp-next ` # --or-- | ||
| 11 | + * `uv tool install gyp-next` | ||
| 11 | 12 | ``` | |
| 12 | 13 | Installing to a new venv 'gyp-next' | |
| 13 | 14 | installed package gyp-next 0.13.0, installed using Python 3.10.6 | |
@@ -17,10 +18,11 @@ done! ✨ 🌟 ✨ | |||
| 17 | 18 | ``` | |
| 18 | 19 | ||
| 19 | 20 | Or to run __gyp-next__ directly without installing it: | |
| 20 | - * `pipx run gyp-next --help` | ||
| 21 | + * `pipx run gyp-next --help ` # --or-- | ||
| 22 | + * `uvx --from=gyp-next gyp --help` | ||
| 21 | 23 | ``` | |
| 22 | 24 | NOTE: running app 'gyp' from 'gyp-next' | |
| 23 | - usage: usage: gyp [options ...] [build_file ...] | ||
| 25 | + usage: gyp [options ...] [build_file ...] | ||
| 24 | 26 | ||
| 25 | 27 | options: | |
| 26 | 28 | -h, --help show this help message and exit | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,18 +32,18 @@ def cmp(x, y): | |||
| 32 | 32 | def MakeGuid(name, seed="msvs_new"): | |
| 33 | 33 | """Returns a GUID for the specified target name. | |
| 34 | 34 | ||
| 35 | - Args: | ||
| 36 | - name: Target name. | ||
| 37 | - seed: Seed for MD5 hash. | ||
| 38 | - Returns: | ||
| 39 | - A GUID-line string calculated from the name and seed. | ||
| 40 | - | ||
| 41 | - This generates something which looks like a GUID, but depends only on the | ||
| 42 | - name and seed. This means the same name/seed will always generate the same | ||
| 43 | - GUID, so that projects and solutions which refer to each other can explicitly | ||
| 44 | - determine the GUID to refer to explicitly. It also means that the GUID will | ||
| 45 | - not change when the project for a target is rebuilt. | ||
| 46 | - """ | ||
| 35 | + Args: | ||
| 36 | + name: Target name. | ||
| 37 | + seed: Seed for MD5 hash. | ||
| 38 | + Returns: | ||
| 39 | + A GUID-line string calculated from the name and seed. | ||
| 40 | + | ||
| 41 | + This generates something which looks like a GUID, but depends only on the | ||
| 42 | + name and seed. This means the same name/seed will always generate the same | ||
| 43 | + GUID, so that projects and solutions which refer to each other can explicitly | ||
| 44 | + determine the GUID to refer to explicitly. It also means that the GUID will | ||
| 45 | + not change when the project for a target is rebuilt. | ||
| 46 | + """ | ||
| 47 | 47 | # Calculate a MD5 signature for the seed and name. | |
| 48 | 48 | d = hashlib.md5((str(seed) + str(name)).encode("utf-8")).hexdigest().upper() | |
| 49 | 49 | # Convert most of the signature to GUID form (discard the rest) | |
@@ -78,15 +78,15 @@ class MSVSFolder(MSVSSolutionEntry): | |||
| 78 | 78 | def __init__(self, path, name=None, entries=None, guid=None, items=None): | |
| 79 | 79 | """Initializes the folder. | |
| 80 | 80 | ||
| 81 | - Args: | ||
| 82 | - path: Full path to the folder. | ||
| 83 | - name: Name of the folder. | ||
| 84 | - entries: List of folder entries to nest inside this folder. May contain | ||
| 85 | - Folder or Project objects. May be None, if the folder is empty. | ||
| 86 | - guid: GUID to use for folder, if not None. | ||
| 87 | - items: List of solution items to include in the folder project. May be | ||
| 88 | - None, if the folder does not directly contain items. | ||
| 89 | - """ | ||
| 81 | + Args: | ||
| 82 | + path: Full path to the folder. | ||
| 83 | + name: Name of the folder. | ||
| 84 | + entries: List of folder entries to nest inside this folder. May contain | ||
| 85 | + Folder or Project objects. May be None, if the folder is empty. | ||
| 86 | + guid: GUID to use for folder, if not None. | ||
| 87 | + items: List of solution items to include in the folder project. May be | ||
| 88 | + None, if the folder does not directly contain items. | ||
| 89 | + """ | ||
| 90 | 90 | if name: | |
| 91 | 91 | self.name = name | |
| 92 | 92 | else: | |
@@ -128,19 +128,19 @@ def __init__( | |||
| 128 | 128 | ): | |
| 129 | 129 | """Initializes the project. | |
| 130 | 130 | ||
| 131 | - Args: | ||
| 132 | - path: Absolute path to the project file. | ||
| 133 | - name: Name of project. If None, the name will be the same as the base | ||
| 134 | - name of the project file. | ||
| 135 | - dependencies: List of other Project objects this project is dependent | ||
| 136 | - upon, if not None. | ||
| 137 | - guid: GUID to use for project, if not None. | ||
| 138 | - spec: Dictionary specifying how to build this project. | ||
| 139 | - build_file: Filename of the .gyp file that the vcproj file comes from. | ||
| 140 | - config_platform_overrides: optional dict of configuration platforms to | ||
| 141 | - used in place of the default for this target. | ||
| 142 | - fixpath_prefix: the path used to adjust the behavior of _fixpath | ||
| 143 | - """ | ||
| 131 | + Args: | ||
| 132 | + path: Absolute path to the project file. | ||
| 133 | + name: Name of project. If None, the name will be the same as the base | ||
| 134 | + name of the project file. | ||
| 135 | + dependencies: List of other Project objects this project is dependent | ||
| 136 | + upon, if not None. | ||
| 137 | + guid: GUID to use for project, if not None. | ||
| 138 | + spec: Dictionary specifying how to build this project. | ||
| 139 | + build_file: Filename of the .gyp file that the vcproj file comes from. | ||
| 140 | + config_platform_overrides: optional dict of configuration platforms to | ||
| 141 | + used in place of the default for this target. | ||
| 142 | + fixpath_prefix: the path used to adjust the behavior of _fixpath | ||
| 143 | + """ | ||
| 144 | 144 | self.path = path | |
| 145 | 145 | self.guid = guid | |
| 146 | 146 | self.spec = spec | |
@@ -195,16 +195,16 @@ def __init__( | |||
| 195 | 195 | ): | |
| 196 | 196 | """Initializes the solution. | |
| 197 | 197 | ||
| 198 | - Args: | ||
| 199 | - path: Path to solution file. | ||
| 200 | - version: Format version to emit. | ||
| 201 | - entries: List of entries in solution. May contain Folder or Project | ||
| 202 | - objects. May be None, if the folder is empty. | ||
| 203 | - variants: List of build variant strings. If none, a default list will | ||
| 204 | - be used. | ||
| 205 | - websiteProperties: Flag to decide if the website properties section | ||
| 206 | - is generated. | ||
| 207 | - """ | ||
| 198 | + Args: | ||
| 199 | + path: Path to solution file. | ||
| 200 | + version: Format version to emit. | ||
| 201 | + entries: List of entries in solution. May contain Folder or Project | ||
| 202 | + objects. May be None, if the folder is empty. | ||
| 203 | + variants: List of build variant strings. If none, a default list will | ||
| 204 | + be used. | ||
| 205 | + websiteProperties: Flag to decide if the website properties section | ||
| 206 | + is generated. | ||
| 207 | + """ | ||
| 208 | 208 | self.path = path | |
| 209 | 209 | self.websiteProperties = websiteProperties | |
| 210 | 210 | self.version = version | |
@@ -230,9 +230,9 @@ def __init__( | |||
| 230 | 230 | def Write(self, writer=gyp.common.WriteOnDiff): | |
| 231 | 231 | """Writes the solution file to disk. | |
| 232 | 232 | ||
| 233 | - Raises: | ||
| 234 | - IndexError: An entry appears multiple times. | ||
| 235 | - """ | ||
| 233 | + Raises: | ||
| 234 | + IndexError: An entry appears multiple times. | ||
| 235 | + """ | ||
| 236 | 236 | # Walk the entry tree and collect all the folders and projects. | |
| 237 | 237 | all_entries = set() | |
| 238 | 238 | entries_to_check = self.entries[:] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,19 +15,19 @@ class Tool: | |||
| 15 | 15 | def __init__(self, name, attrs=None): | |
| 16 | 16 | """Initializes the tool. | |
| 17 | 17 | ||
| 18 | - Args: | ||
| 19 | - name: Tool name. | ||
| 20 | - attrs: Dict of tool attributes; may be None. | ||
| 21 | - """ | ||
| 18 | + Args: | ||
| 19 | + name: Tool name. | ||
| 20 | + attrs: Dict of tool attributes; may be None. | ||
| 21 | + """ | ||
| 22 | 22 | self._attrs = attrs or {} | |
| 23 | 23 | self._attrs["Name"] = name | |
| 24 | 24 | ||
| 25 | 25 | def _GetSpecification(self): | |
| 26 | 26 | """Creates an element for the tool. | |
| 27 | 27 | ||
| 28 | - Returns: | ||
| 29 | - A new xml.dom.Element for the tool. | ||
| 30 | - """ | ||
| 28 | + Returns: | ||
| 29 | + A new xml.dom.Element for the tool. | ||
| 30 | + """ | ||
| 31 | 31 | return ["Tool", self._attrs] | |
| 32 | 32 | ||
| 33 | 33 | ||
@@ -37,10 +37,10 @@ class Filter: | |||
| 37 | 37 | def __init__(self, name, contents=None): | |
| 38 | 38 | """Initializes the folder. | |
| 39 | 39 | ||
| 40 | - Args: | ||
| 41 | - name: Filter (folder) name. | ||
| 42 | - contents: List of filenames and/or Filter objects contained. | ||
| 43 | - """ | ||
| 40 | + Args: | ||
| 41 | + name: Filter (folder) name. | ||
| 42 | + contents: List of filenames and/or Filter objects contained. | ||
| 43 | + """ | ||
| 44 | 44 | self.name = name | |
| 45 | 45 | self.contents = list(contents or []) | |
| 46 | 46 | ||
@@ -54,13 +54,13 @@ class Writer: | |||
| 54 | 54 | def __init__(self, project_path, version, name, guid=None, platforms=None): | |
| 55 | 55 | """Initializes the project. | |
| 56 | 56 | ||
| 57 | - Args: | ||
| 58 | - project_path: Path to the project file. | ||
| 59 | - version: Format version to emit. | ||
| 60 | - name: Name of the project. | ||
| 61 | - guid: GUID to use for project, if not None. | ||
| 62 | - platforms: Array of string, the supported platforms. If null, ['Win32'] | ||
| 63 | - """ | ||
| 57 | + Args: | ||
| 58 | + project_path: Path to the project file. | ||
| 59 | + version: Format version to emit. | ||
| 60 | + name: Name of the project. | ||
| 61 | + guid: GUID to use for project, if not None. | ||
| 62 | + platforms: Array of string, the supported platforms. If null, ['Win32'] | ||
| 63 | + """ | ||
| 64 | 64 | self.project_path = project_path | |
| 65 | 65 | self.version = version | |
| 66 | 66 | self.name = name | |
@@ -84,21 +84,21 @@ def __init__(self, project_path, version, name, guid=None, platforms=None): | |||
| 84 | 84 | def AddToolFile(self, path): | |
| 85 | 85 | """Adds a tool file to the project. | |
| 86 | 86 | ||
| 87 | - Args: | ||
| 88 | - path: Relative path from project to tool file. | ||
| 89 | - """ | ||
| 87 | + Args: | ||
| 88 | + path: Relative path from project to tool file. | ||
| 89 | + """ | ||
| 90 | 90 | self.tool_files_section.append(["ToolFile", {"RelativePath": path}]) | |
| 91 | 91 | ||
| 92 | 92 | def _GetSpecForConfiguration(self, config_type, config_name, attrs, tools): | |
| 93 | 93 | """Returns the specification for a configuration. | |
| 94 | 94 | ||
| 95 | - Args: | ||
| 96 | - config_type: Type of configuration node. | ||
| 97 | - config_name: Configuration name. | ||
| 98 | - attrs: Dict of configuration attributes; may be None. | ||
| 99 | - tools: List of tools (strings or Tool objects); may be None. | ||
| 100 | - Returns: | ||
| 101 | - """ | ||
| 95 | + Args: | ||
| 96 | + config_type: Type of configuration node. | ||
| 97 | + config_name: Configuration name. | ||
| 98 | + attrs: Dict of configuration attributes; may be None. | ||
| 99 | + tools: List of tools (strings or Tool objects); may be None. | ||
| 100 | + Returns: | ||
| 101 | + """ | ||
| 102 | 102 | # Handle defaults | |
| 103 | 103 | if not attrs: | |
| 104 | 104 | attrs = {} | |
@@ -122,23 +122,23 @@ def _GetSpecForConfiguration(self, config_type, config_name, attrs, tools): | |||
| 122 | 122 | def AddConfig(self, name, attrs=None, tools=None): | |
| 123 | 123 | """Adds a configuration to the project. | |
| 124 | 124 | ||
| 125 | - Args: | ||
| 126 | - name: Configuration name. | ||
| 127 | - attrs: Dict of configuration attributes; may be None. | ||
| 128 | - tools: List of tools (strings or Tool objects); may be None. | ||
| 129 | - """ | ||
| 125 | + Args: | ||
| 126 | + name: Configuration name. | ||
| 127 | + attrs: Dict of configuration attributes; may be None. | ||
| 128 | + tools: List of tools (strings or Tool objects); may be None. | ||
| 129 | + """ | ||
| 130 | 130 | spec = self._GetSpecForConfiguration("Configuration", name, attrs, tools) | |
| 131 | 131 | self.configurations_section.append(spec) | |
| 132 | 132 | ||
| 133 | 133 | def _AddFilesToNode(self, parent, files): | |
| 134 | 134 | """Adds files and/or filters to the parent node. | |
| 135 | 135 | ||
| 136 | - Args: | ||
| 137 | - parent: Destination node | ||
| 138 | - files: A list of Filter objects and/or relative paths to files. | ||
| 136 | + Args: | ||
| 137 | + parent: Destination node | ||
| 138 | + files: A list of Filter objects and/or relative paths to files. | ||
| 139 | 139 | ||
| 140 | - Will call itself recursively, if the files list contains Filter objects. | ||
| 141 | - """ | ||
| 140 | + Will call itself recursively, if the files list contains Filter objects. | ||
| 141 | + """ | ||
| 142 | 142 | for f in files: | |
| 143 | 143 | if isinstance(f, Filter): | |
| 144 | 144 | node = ["Filter", {"Name": f.name}] | |
@@ -151,29 +151,29 @@ def _AddFilesToNode(self, parent, files): | |||
| 151 | 151 | def AddFiles(self, files): | |
| 152 | 152 | """Adds files to the project. | |
| 153 | 153 | ||
| 154 | - Args: | ||
| 155 | - files: A list of Filter objects and/or relative paths to files. | ||
| 154 | + Args: | ||
| 155 | + files: A list of Filter objects and/or relative paths to files. | ||
| 156 | 156 | ||
| 157 | - This makes a copy of the file/filter tree at the time of this call. If you | ||
| 158 | - later add files to a Filter object which was passed into a previous call | ||
| 159 | - to AddFiles(), it will not be reflected in this project. | ||
| 160 | - """ | ||
| 157 | + This makes a copy of the file/filter tree at the time of this call. If you | ||
| 158 | + later add files to a Filter object which was passed into a previous call | ||
| 159 | + to AddFiles(), it will not be reflected in this project. | ||
| 160 | + """ | ||
| 161 | 161 | self._AddFilesToNode(self.files_section, files) | |
| 162 | 162 | # TODO(rspangler) This also doesn't handle adding files to an existing | |
| 163 | 163 | # filter. That is, it doesn't merge the trees. | |
| 164 | 164 | ||
| 165 | 165 | def AddFileConfig(self, path, config, attrs=None, tools=None): | |
| 166 | 166 | """Adds a configuration to a file. | |
| 167 | 167 | ||
| 168 | - Args: | ||
| 169 | - path: Relative path to the file. | ||
| 170 | - config: Name of configuration to add. | ||
| 171 | - attrs: Dict of configuration attributes; may be None. | ||
| 172 | - tools: List of tools (strings or Tool objects); may be None. | ||
| 168 | + Args: | ||
| 169 | + path: Relative path to the file. | ||
| 170 | + config: Name of configuration to add. | ||
| 171 | + attrs: Dict of configuration attributes; may be None. | ||
| 172 | + tools: List of tools (strings or Tool objects); may be None. | ||
| 173 | 173 | ||
| 174 | - Raises: | ||
| 175 | - ValueError: Relative path does not match any file added via AddFiles(). | ||
| 176 | - """ | ||
| 174 | + Raises: | ||
| 175 | + ValueError: Relative path does not match any file added via AddFiles(). | ||
| 176 | + """ | ||
| 177 | 177 | # Find the file node with the right relative path | |
| 178 | 178 | parent = self.files_dict.get(path) | |
| 179 | 179 | if not parent: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments