protool 1.1.1__tar.gz → 2.0.0__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.
- {protool-1.1.1 → protool-2.0.0}/PKG-INFO +5 -5
- {protool-1.1.1 → protool-2.0.0}/protool/__init__.py +9 -9
- {protool-1.1.1 → protool-2.0.0}/protool/command_line.py +3 -2
- {protool-1.1.1 → protool-2.0.0}/pyproject.toml +15 -11
- protool-1.1.1/setup.py +0 -34
- {protool-1.1.1 → protool-2.0.0}/LICENSE +0 -0
- {protool-1.1.1 → protool-2.0.0}/README.md +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: protool
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: A tool for dealing with provisioning profiles
|
|
5
5
|
Home-page: https://github.com/Microsoft/protool
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: provisioning,profiles,apple,ios,xcode,mobileprovision
|
|
8
8
|
Author: Dale Myers
|
|
9
9
|
Author-email: dalemy@microsoft.com
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.8,<4.0
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Environment :: Console
|
|
13
13
|
Classifier: Environment :: MacOS X
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.8
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Topic :: Software Development
|
|
22
22
|
Classifier: Topic :: Utilities
|
|
23
|
-
Requires-Dist: pyOpenSSL (>=
|
|
23
|
+
Requires-Dist: pyOpenSSL (>=23.2.0,<24.0.0)
|
|
24
24
|
Project-URL: Repository, https://github.com/Microsoft/protool
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
|
|
@@ -12,8 +12,8 @@ import shutil
|
|
|
12
12
|
import subprocess
|
|
13
13
|
import sys
|
|
14
14
|
import tempfile
|
|
15
|
-
from typing import Any, cast, Dict,
|
|
16
|
-
import
|
|
15
|
+
from typing import Any, cast, Dict, List, Optional
|
|
16
|
+
from OpenSSL import crypto
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class ProvisioningType(Enum):
|
|
@@ -66,16 +66,16 @@ class ProvisioningProfile:
|
|
|
66
66
|
|
|
67
67
|
raise Exception("Unable to determine provisioning profile type")
|
|
68
68
|
|
|
69
|
-
def developer_certificates(self) -> List[
|
|
69
|
+
def developer_certificates(self) -> List[crypto.X509]:
|
|
70
70
|
"""Returns developer certificates as a list of PyOpenSSL X509."""
|
|
71
|
-
dev_certs: List[
|
|
71
|
+
dev_certs: List[crypto.X509] = []
|
|
72
72
|
raw_cert_items: List[str] = cast(
|
|
73
73
|
List[str], self._contents.get("DeveloperCertificates", [])
|
|
74
74
|
)
|
|
75
75
|
|
|
76
76
|
for cert_item in raw_cert_items:
|
|
77
|
-
loaded_cert:
|
|
78
|
-
|
|
77
|
+
loaded_cert: crypto.X509 = crypto.load_certificate(
|
|
78
|
+
crypto.FILETYPE_ASN1, cert_item.encode()
|
|
79
79
|
)
|
|
80
80
|
dev_certs.append(loaded_cert)
|
|
81
81
|
|
|
@@ -199,14 +199,14 @@ def diff(
|
|
|
199
199
|
a_temp_path = os.path.join(temp_dir, profile_a.file_name)
|
|
200
200
|
b_temp_path = os.path.join(temp_dir, profile_b.file_name)
|
|
201
201
|
|
|
202
|
-
with open(a_temp_path, "w") as temp_profile:
|
|
202
|
+
with open(a_temp_path, "w", encoding="utf-8") as temp_profile:
|
|
203
203
|
temp_profile.write(a_xml)
|
|
204
204
|
|
|
205
|
-
with open(b_temp_path, "w") as temp_profile:
|
|
205
|
+
with open(b_temp_path, "w", encoding="utf-8") as temp_profile:
|
|
206
206
|
temp_profile.write(b_xml)
|
|
207
207
|
|
|
208
208
|
# We deliberately don't wrap the tool so that arguments work as well
|
|
209
|
-
diff_command = '
|
|
209
|
+
diff_command = f'{diff_tool} "{a_temp_path}" "{b_temp_path}"'
|
|
210
210
|
|
|
211
211
|
try:
|
|
212
212
|
diff_contents = subprocess.check_output(
|
|
@@ -81,10 +81,11 @@ def _handle_read(args: argparse.Namespace) -> int:
|
|
|
81
81
|
|
|
82
82
|
try:
|
|
83
83
|
result = json.dumps(value)
|
|
84
|
+
print(result)
|
|
84
85
|
return 0
|
|
85
|
-
except Exception:
|
|
86
|
+
except Exception as ex:
|
|
86
87
|
print(
|
|
87
|
-
f"Unable to serialize values
|
|
88
|
+
f"Unable to serialize values: {ex}",
|
|
88
89
|
file=sys.stderr,
|
|
89
90
|
)
|
|
90
91
|
return 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "protool"
|
|
3
|
-
version = "
|
|
3
|
+
version = "2.0.0"
|
|
4
4
|
description = "A tool for dealing with provisioning profiles"
|
|
5
5
|
|
|
6
6
|
license = "MIT"
|
|
@@ -22,7 +22,10 @@ classifiers = [
|
|
|
22
22
|
'Environment :: MacOS X',
|
|
23
23
|
'Intended Audience :: Developers',
|
|
24
24
|
'Programming Language :: Python :: 3',
|
|
25
|
-
'Programming Language :: Python :: 3.
|
|
25
|
+
'Programming Language :: Python :: 3.8',
|
|
26
|
+
'Programming Language :: Python :: 3.9',
|
|
27
|
+
'Programming Language :: Python :: 3.10',
|
|
28
|
+
'Programming Language :: Python :: 3.11',
|
|
26
29
|
'Topic :: Software Development',
|
|
27
30
|
'Topic :: Utilities'
|
|
28
31
|
]
|
|
@@ -31,16 +34,17 @@ classifiers = [
|
|
|
31
34
|
protool = 'protool:command_line.run'
|
|
32
35
|
|
|
33
36
|
[tool.poetry.dependencies]
|
|
34
|
-
python = "^3.
|
|
35
|
-
pyOpenSSL ="^
|
|
37
|
+
python = "^3.8"
|
|
38
|
+
pyOpenSSL ="^23.2.0"
|
|
36
39
|
|
|
37
40
|
[tool.poetry.dev-dependencies]
|
|
38
|
-
black = "
|
|
39
|
-
mypy = "
|
|
40
|
-
pylint = "
|
|
41
|
-
pytest = "
|
|
42
|
-
pytest-cov = "
|
|
41
|
+
black = "^23.7.0"
|
|
42
|
+
mypy = "^1.4.1"
|
|
43
|
+
pylint = "^2.17.5"
|
|
44
|
+
pytest = "^7.4.0"
|
|
45
|
+
pytest-cov = "^4.1.0"
|
|
46
|
+
types-pyOpenSSL = "^23.2.0.2"
|
|
43
47
|
|
|
44
48
|
[build-system]
|
|
45
|
-
requires = ["poetry
|
|
46
|
-
build-backend = "poetry.masonry.api"
|
|
49
|
+
requires = ["poetry-core"]
|
|
50
|
+
build-backend = "poetry.core.masonry.api"
|
protool-1.1.1/setup.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
packages = \
|
|
5
|
-
['protool']
|
|
6
|
-
|
|
7
|
-
package_data = \
|
|
8
|
-
{'': ['*']}
|
|
9
|
-
|
|
10
|
-
install_requires = \
|
|
11
|
-
['pyOpenSSL>=19.0.0,<20.0.0']
|
|
12
|
-
|
|
13
|
-
entry_points = \
|
|
14
|
-
{'console_scripts': ['protool = protool:command_line.run']}
|
|
15
|
-
|
|
16
|
-
setup_kwargs = {
|
|
17
|
-
'name': 'protool',
|
|
18
|
-
'version': '1.1.1',
|
|
19
|
-
'description': 'A tool for dealing with provisioning profiles',
|
|
20
|
-
'long_description': '# protool \n\n[](https://pypi.org/project/protool/)\n[](https://github.com/Microsoft/protool/blob/master/LICENSE)\n\nA tool for dealing with provisioning profiles.\n\nWhat can it do? \n\n* Read profiles as XML or as a dictionary\n* Read the values from the profile\n* Diff two profiles to see what has changed\n\n### Installation\n\n pip install protool\n\n### Examples:\n\n import protool\n profile = protool.ProvisioningProfile("/path/to/profile")\n\n # Get the diff of two profiles\n diff = protool.diff("/path/to/first", "/path/to/second", tool_override="diff")\n\n # Get the UUID of a profile\n print profile.uuid\n\n # Get the full XML of the profile\n print profile.xml\n\n # Get the parsed contents of the profile as a dictionary\n print profile.contents()\n\n\nAlternatively, from the command line:\n\n # Get the diff\n protool diff --profiles /path/to/profile1 /path/to/profile2 --tool diff\n\n # Get the UUID of a profile\n protool read --profile /path/to/profile --key UUID\n\n # Get the raw XML (identical to using `security cms -D -i /path/to/profile`)\n protool decode --profile /path/to/profile\n\n\n# Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n',
|
|
21
|
-
'author': 'Dale Myers',
|
|
22
|
-
'author_email': 'dalemy@microsoft.com',
|
|
23
|
-
'maintainer': None,
|
|
24
|
-
'maintainer_email': None,
|
|
25
|
-
'url': 'https://github.com/Microsoft/protool',
|
|
26
|
-
'packages': packages,
|
|
27
|
-
'package_data': package_data,
|
|
28
|
-
'install_requires': install_requires,
|
|
29
|
-
'entry_points': entry_points,
|
|
30
|
-
'python_requires': '>=3.6.2,<4.0.0',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setup(**setup_kwargs)
|
|
File without changes
|
|
File without changes
|