You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[33m95b384b[m Merge pull request #6 from cloudify-cosmo/CFY-3709-add-module-exclusion
5
+
[33m0adc2fa[m[33m ([1;31morigin/CFY-3709-add-module-exclusion[m[33m, [1;32mCFY-3709-add-module-exclusion[m[33m)[m CFY-3709 added module exclusion, fixed a bug in validation and added showmeta cli func
6
+
[33mc083124[m Update README.md
3
7
[33m6391892[m Merge pull request #5 from cloudify-cosmo/refine-meta-properties
4
8
[33mf9f5691[m[33m ([1;31morigin/refine-meta-properties[m[33m, [1;32mrefine-meta-properties[m[33m)[m Added support for user provided python versions, ignoring the supported platform check and linux specific handling.
Copy file name to clipboardExpand all lines: README.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,18 +31,18 @@ wagon create --help
31
31
#### Examples
32
32
33
33
```shell
34
-
# create an archive by retrieving the source from PyPI and keep the downloaded wheels (kept under <cwd>/plugin) and exclude the cloudify-plugins-common and cloudify-rest-client modules from the archive.
34
+
# create an archive by retrieving the source from PyPI and keep the downloaded wheels (kept under <cwd>/plugin) and exclude the cloudify-plugins-common and cloudify-rest-client packages from the archive.
# create an archive by retrieving the source from a URL and creating wheels from requirement files found within the archive. Then, validation of the archive takes place.
# create an archive by retrieving the source from a local path and output the tar.gz file to /tmp/<MODULE>.tar.gz (defaults to <cwd>/<MODULE>.tar.gz) and provides explicit Python versions supported by the module (which usually defaults to the first two digits of the Python version used to create the archive.)
# create an archive by retrieving the source from a local path and output the tar.gz file to /tmp/<PACKAGE>.tar.gz (defaults to <cwd>/<PACKAGE>.tar.gz) and provides explicit Python versions supported by the package (which usually defaults to the first two digits of the Python version used to create the archive.)
Regarding exclusions, note that excluding modules can result in an archive being non-installable. The user will be warned about this but creation will succeed. Creation validation, though (i.e. using the `--validate` flag), will fail and show an error incase the archive cannot be installed.
42
+
Regarding exclusions, note that excluding packages can result in an archive being non-installable. The user will be warned about this but creation will succeed. Creation validation, though (i.e. using the `--validate` flag), will fail and show an error incase the archive cannot be installed.
43
43
44
-
Also note that Wagon doesn't currently provide a way for packaging modules that are in editable mode.
45
-
So, for instance, providing a dev-requirements file which contains a `-e DEPENDENCY` requirement will not be taken into consideration. This is not related to wagon but rather to the default `pip wheel` implementation stating that it will be "Skipping bdist_wheel for #MODULE#, due to being editable". We might allow processing editable provided dependencies in the future.
44
+
Also note that Wagon doesn't currently provide a way for packaging packages that are in editable mode.
45
+
So, for instance, providing a dev-requirements file which contains a `-e DEPENDENCY` requirement will not be taken into consideration. This is not related to wagon but rather to the default `pip wheel` implementation stating that it will be "Skipping bdist_wheel for #PACKAGE#, due to being editable". We might allow processing editable provided dependencies in the future.
46
46
47
47
### Install Packages
48
48
@@ -53,9 +53,9 @@ wagon install --help
53
53
#### Examples
54
54
55
55
```shell
56
-
# install a module from a local archive tar file and upgrade if already installed. Also, ignore the platform check which would force a module (whether it is or isn't compiled for a specific platform) to be installed.
56
+
# install a package from a local archive tar file and upgrade if already installed. Also, ignore the platform check which would force a package (whether it is or isn't compiled for a specific platform) to be installed.
@@ -64,7 +64,7 @@ Note that `--pre` is appended to the installation command to enable installation
64
64
65
65
#### Installing Manually
66
66
67
-
While wagon provides a generic way of installing wagon created archives, you might not want to use the installer as you might not wish to install wagon on your application servers. Installing the module manually via pip is as easy as running (for example):
67
+
While wagon provides a generic way of installing wagon created archives, you might not want to use the installer as you might not wish to install wagon on your application servers. Installing the package manually via pip is as easy as running (for example):
68
68
69
69
```shell
70
70
tar -xzvf http://me.com/cloudify_script_plugin-1.2-py27-none-any-none-none.tar.gz
The `validate` function provides shallow validation of a Wagon archive. Basically, it checks that some keys in the metadata are found, that all required wheels for a module are present and that the module is installable. It obviously does not check for a module's functionality.
81
+
The `validate` function provides shallow validation of a Wagon archive. Basically, it checks that some keys in the metadata are found, that all required wheels for a package are present and that the package is installable. It obviously does not check for a package's functionality.
82
82
83
83
This shallow validation should, at the very least, allow a user to be sure that a Wagon archive is not corrupted.
When providing a PyPI source, it must be supplied as MODULE_NAME==MODULE_VERSION. wagon then applies the correct name and version to the archive according to the two parameters.
116
+
When providing a PyPI source, it must be supplied as PACKAGE_NAME==PACKAGE_VERSION. wagon then applies the correct name and version to the archive according to the two parameters.
117
117
118
118
### Source: Else
119
119
For local path and URL sources, the name and version are automatically extracted from the setup.py file.
@@ -135,23 +135,23 @@ A Metadata file is generated for the archive and looks somewhat like this:
135
135
"distribution_release": "trusty",
136
136
"distribution_version": "14.04"
137
137
},
138
-
"module_name": "cloudify-script-plugin",
139
-
"module_source": "cloudify-script-plugin==1.2",
140
-
"module_version": "1.2",
138
+
"package_name": "cloudify-script-plugin",
139
+
"package_source": "cloudify-script-plugin==1.2",
140
+
"package_version": "1.2",
141
141
"supported_platform": "any",
142
142
"supported_python_versions": [
143
143
"py26",
144
144
"py27"
145
145
],
146
146
"wheels": [
147
-
"proxy_tools-0.1.0-py2-none-any.whl",
148
-
"pyzmq-14.7.0-cp27-none-linux_x86_64.whl",
149
-
"bottle-0.12.7-py2-none-any.whl",
150
-
"networkx-1.8.1-py2-none-any.whl",
151
-
"requests-2.5.1-py2.py3-none-any.whl",
152
-
"PyYAML-3.10-cp27-none-linux_x86_64.whl",
153
-
"pika-0.9.13-py2-none-any.whl",
154
-
"jsonschema-2.3.0-py2.py3-none-any.whl",
147
+
"proxy_tools-0.1.0-py2-none-any.whl",
148
+
"pyzmq-14.7.0-cp27-none-linux_x86_64.whl",
149
+
"bottle-0.12.7-py2-none-any.whl",
150
+
"networkx-1.8.1-py2-none-any.whl",
151
+
"requests-2.5.1-py2.py3-none-any.whl",
152
+
"PyYAML-3.10-cp27-none-linux_x86_64.whl",
153
+
"pika-0.9.13-py2-none-any.whl",
154
+
"jsonschema-2.3.0-py2.py3-none-any.whl",
155
155
"cloudify_dsl_parser-3.2-py2-none-any.whl",
156
156
"cloudify_rest_client-3.2-py2-none-any.whl",
157
157
"cloudify_script_plugin-1.2-py2-none-any.whl"
@@ -163,9 +163,9 @@ A Metadata file is generated for the archive and looks somewhat like this:
163
163
```
164
164
165
165
* The wheels to be installed reside in the tar.gz file under 'wheels/*.whl'.
166
-
* The Metadata file resides in the tar.gz file under 'module.json'.
167
-
* The installer uses the metadata file to check that the platform fits the machine the module is being installed on.
168
-
* OS Properties only appear when creating compiled Linux modules (see Linux Distributions section). In case of a non-linux platform (e.g. win32, any), null values will be supplied for OS properties.
166
+
* The Metadata file resides in the tar.gz file under 'package.json'.
167
+
* The installer uses the metadata file to check that the platform fits the machine the package is being installed on.
168
+
* OS Properties only appear when creating compiled Linux packages (see Linux Distributions section). In case of a non-linux platform (e.g. win32, any), null values will be supplied for OS properties.
169
169
170
170
171
171
## Archive naming convention and Platform
@@ -174,8 +174,8 @@ The archive is named according to the Wheel naming convention described in [PEP0
174
174
175
175
Example Output Archive: `cloudify_fabric_plugin-1.2.1-py27-none-any-none-none.tar.gz`
176
176
177
-
*`{python tag}`: The Python version is set by the Python running the packaging process. That means that while a module might run on both py27 and py33 (for example), since the packaging process took place using Python 2.7, only py27 will be appended to the name. A user can also explicitly provide the supported Python versions for the module via the `pyver` flag.
178
-
*`{platform tag}`: The platform (e.g. `linux_x86_64`, `win32`) is set each specific wheel. To know which platform the module with its dependencies can be installed on, all wheels are checked. If a specific wheel has a platform property other than `any`, that platform will be used as the platform of the package. Of course, we assume that there can't be wheels downloaded or created on a specific machine platform that belongs to two different platforms.
177
+
*`{python tag}`: The Python version is set by the Python running the packaging process. That means that while a package might run on both py27 and py33 (for example), since the packaging process took place using Python 2.7, only py27 will be appended to the name. A user can also explicitly provide the supported Python versions for the package via the `pyver` flag.
178
+
*`{platform tag}`: The platform (e.g. `linux_x86_64`, `win32`) is set each specific wheel. To know which platform the package with its dependencies can be installed on, all wheels are checked. If a specific wheel has a platform property other than `any`, that platform will be used as the platform of the package. Of course, we assume that there can't be wheels downloaded or created on a specific machine platform that belongs to two different platforms.
179
179
*`{abi tag}`: Note that the ABI tag is currently ignored and will always be `none`. This might be changed in the future to support providing an ABI tag.
180
180
* For Linux (see below), two additional tags are added: `{distribution tag}` and `{release tag}`. Note that these tags are NOT a part of the PEP.
181
181
@@ -186,11 +186,11 @@ Example Output Archive: `cloudify_fabric_plugin-1.2.1-py27-none-linux_x86_64-ubu
186
186
187
187
Wheels which require compilation of C extensions and are compiled on Linux are not uploaded to PyPI due to variations between compilation environments on different distributions and links to varying system libraries.
188
188
189
-
To overcome that (partially), if running Wagon on Linux and the module requires compilation, the metadata and archive name both provide the distribution and release of the OS that the archive was created on (via platform.linux_distribution()). Statistically speaking, this should provide the user with the information they need to know which OS the module can be installed on. Obviously, this is not true for cases where non-generic compilation methods are used on the creating OS but otherwise should work, and should specifically always work when both compilation environment and Python version are similar on the creating and installing OS - which, we generally recommend.
189
+
To overcome that (partially), if running Wagon on Linux and the package requires compilation, the metadata and archive name both provide the distribution and release of the OS that the archive was created on (via platform.linux_distribution()). Statistically speaking, this should provide the user with the information they need to know which OS the package can be installed on. Obviously, this is not true for cases where non-generic compilation methods are used on the creating OS but otherwise should work, and should specifically always work when both compilation environment and Python version are similar on the creating and installing OS - which, we generally recommend.
190
190
191
-
What this practically means, is that in most cases, using the metadata to compare the distro, release and the Python version under which the module is installed would allow a user to use Wagon rather safely. Of course, Wagon provides no guarantee whatsoever as to whether this will actually work or not and users must test their archives.
191
+
What this practically means, is that in most cases, using the metadata to compare the distro, release and the Python version under which the package is installed would allow a user to use Wagon rather safely. Of course, Wagon provides no guarantee whatsoever as to whether this will actually work or not and users must test their archives.
192
192
193
-
That being said, Wagon is completely safe for creating and installing Pure Python module archives for any platform, and, due to the nature of Wheels, modules compiled for OS X or Windows.
193
+
That being said, Wagon is completely safe for creating and installing Pure Python package archives for any platform, and, due to the nature of Wheels, packages compiled for OS X or Windows.
0 commit comments