pulp-cli-deb 0.0.7__tar.gz → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-cli-deb
3
- Version: 0.0.7
3
+ Version: 0.2.0
4
4
  Summary: Command line interface to talk to pulpcore's REST API. (Deb plugin commands)
5
5
  Author-email: Pulp Team <pulp-list@redhat.com>
6
6
  License: GPLv2+
@@ -14,5 +14,5 @@ Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Topic :: System :: Software Distribution
16
16
  Classifier: Typing :: Typed
17
- Requires-Python: >=3.6
17
+ Requires-Python: >=3.8
18
18
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-cli-deb
3
- Version: 0.0.7
3
+ Version: 0.2.0
4
4
  Summary: Command line interface to talk to pulpcore's REST API. (Deb plugin commands)
5
5
  Author-email: Pulp Team <pulp-list@redhat.com>
6
6
  License: GPLv2+
@@ -14,5 +14,5 @@ Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Topic :: System :: Software Distribution
16
16
  Classifier: Typing :: Typed
17
- Requires-Python: >=3.6
17
+ Requires-Python: >=3.8
18
18
  Description-Content-Type: text/markdown
@@ -0,0 +1,2 @@
1
+ pulp-cli<0.28,>=0.23.2
2
+ pulp-glue-deb==0.2.0
@@ -9,7 +9,7 @@ from pulpcore.cli.deb.publication import publication
9
9
  from pulpcore.cli.deb.remote import remote
10
10
  from pulpcore.cli.deb.repository import repository
11
11
 
12
- __version__ = "0.0.7"
12
+ __version__ = "0.2.0"
13
13
 
14
14
 
15
15
  @pulp_group(name="deb")
@@ -77,7 +77,7 @@ repository_option = resource_option(
77
77
  "Repository to add the content to in the form '[[<plugin>:]<resource_type>:]<name>' or by "
78
78
  "href."
79
79
  ),
80
- allowed_with_contexts=(PulpDebPackageContext,),
80
+ allowed_with_contexts=(PulpDebPackageContext, PulpDebReleaseComponentContext),
81
81
  )
82
82
 
83
83
 
@@ -272,12 +272,24 @@ create_options = [
272
272
  callback=_sha256_artifact_callback,
273
273
  allowed_with_contexts=(PulpDebPackageContext,),
274
274
  ),
275
+ pulp_option(
276
+ "--distribution",
277
+ required=True,
278
+ help=_("The APT repo distribution to use"),
279
+ allowed_with_contexts=(PulpDebReleaseComponentContext,),
280
+ ),
281
+ pulp_option(
282
+ "--component",
283
+ required=True,
284
+ help=_("The APT repo component to use"),
285
+ allowed_with_contexts=(PulpDebReleaseComponentContext,),
286
+ ),
275
287
  repository_option,
276
288
  ]
277
289
  content.add_command(
278
290
  create_command(
279
291
  decorators=create_options,
280
- allowed_with_contexts=(PulpDebPackageContext,),
292
+ allowed_with_contexts=(PulpDebPackageContext, PulpDebReleaseComponentContext),
281
293
  )
282
294
  )
283
295
 
@@ -11,6 +11,7 @@ from pulpcore.cli.common.generic import (
11
11
  label_command,
12
12
  label_select_option,
13
13
  list_command,
14
+ load_string_callback,
14
15
  name_option,
15
16
  pass_pulp_context,
16
17
  show_command,
@@ -75,6 +76,11 @@ apt_remote_create_options = (
75
76
  required=True,
76
77
  help=distribution_help,
77
78
  ),
79
+ click.option(
80
+ "--gpgkey",
81
+ help=_("Gpg public key to verify origin releases against or @file containing same."),
82
+ callback=load_string_callback,
83
+ ),
78
84
  ]
79
85
  )
80
86
  apt_remote_update_options = (
@@ -88,6 +94,11 @@ apt_remote_update_options = (
88
94
  multiple=True,
89
95
  help=distribution_help,
90
96
  ),
97
+ click.option(
98
+ "--gpgkey",
99
+ help=_("Gpg public key to verify origin releases against or @file containing same."),
100
+ callback=load_string_callback,
101
+ ),
91
102
  ]
92
103
  )
93
104
 
@@ -30,7 +30,7 @@ from pulpcore.cli.common.generic import (
30
30
  pulp_option,
31
31
  repository_content_command,
32
32
  repository_href_option,
33
- repository_option,
33
+ repository_lookup_option,
34
34
  resource_option,
35
35
  retained_versions_option,
36
36
  show_command,
@@ -93,7 +93,7 @@ remote_option = resource_option(
93
93
  default_plugin="deb",
94
94
  default_type="apt",
95
95
  context_table={"deb:apt": PulpAptRemoteContext},
96
- needs_plugins=[PluginRequirement("deb", "2.12.0")],
96
+ needs_plugins=[PluginRequirement("deb", specifier=">=2.12.0")],
97
97
  )
98
98
 
99
99
 
@@ -115,13 +115,13 @@ def repository(ctx: click.Context, pulp_ctx: PulpCLIContext, repo_type: str) ->
115
115
 
116
116
 
117
117
  lookup_options = [href_option, name_option]
118
- nested_lookup_options = [repository_href_option, repository_option]
118
+ nested_lookup_options = [repository_href_option, repository_lookup_option]
119
119
  update_options = [
120
120
  click.option("--description"),
121
121
  remote_option,
122
122
  # pulp_option(
123
123
  # "--autopublish/--no-autopublish",
124
- # needs_plugins=[PluginRequirement("deb", "999.0.0")],
124
+ # needs_plugins=[PluginRequirement("deb", specifier=">=999.0.0")],
125
125
  # default=None,
126
126
  # ),
127
127
  retained_versions_option,
@@ -166,7 +166,7 @@ repository.add_command(
166
166
  "since the last sync. This greately improves re-sync performance in such cases. Disable if "
167
167
  "the sync result does not match expectations."
168
168
  ),
169
- needs_plugins=[PluginRequirement("deb", min="2.20.0.dev")],
169
+ needs_plugins=[PluginRequirement("deb", specifier=">=2.20.0")],
170
170
  )
171
171
  @pass_repository_context
172
172
  def sync(
@@ -176,7 +176,6 @@ def sync(
176
176
  optimize: Optional[bool],
177
177
  ) -> None:
178
178
  repository = repository_ctx.entity
179
- repository_href = repository_ctx.pulp_href
180
179
 
181
180
  body: Dict[str, Any] = {}
182
181
 
@@ -187,7 +186,7 @@ def sync(
187
186
  body["optimize"] = optimize
188
187
 
189
188
  if isinstance(remote, PulpEntityContext):
190
- body["remote"] = remote.pulp_href
189
+ body["remote"] = remote
191
190
  elif repository["remote"] is None:
192
191
  raise click.ClickException(
193
192
  _(
@@ -196,7 +195,4 @@ def sync(
196
195
  ).format(name=repository["name"])
197
196
  )
198
197
 
199
- repository_ctx.sync(
200
- href=repository_href,
201
- body=body,
202
- )
198
+ repository_ctx.sync(body=body)
@@ -0,0 +1,210 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pulp-cli-deb"
7
+ version = "0.2.0"
8
+ description = "Command line interface to talk to pulpcore's REST API. (Deb plugin commands)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "GPLv2+"}
12
+ authors = [
13
+ {name = "Pulp Team", email = "pulp-list@redhat.com"},
14
+ ]
15
+ classifiers=[
16
+ "Development Status :: 4 - Beta",
17
+ "Environment :: Console",
18
+ "Intended Audience :: System Administrators",
19
+ "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Topic :: System :: Software Distribution",
23
+ "Typing :: Typed",
24
+ ]
25
+ dependencies = [
26
+ "pulp-cli>=0.23.2,<0.28",
27
+ "pulp-glue-deb==0.2.0",
28
+ ]
29
+
30
+ [project.urls]
31
+ repository = "https://github.com/pulp/pulp-cli-deb"
32
+ changelog = "https://github.com/pulp/pulp-cli-deb/blob/main/CHANGES.md"
33
+
34
+ [project.entry-points."pulp_cli.plugins"]
35
+ deb = "pulpcore.cli.deb"
36
+
37
+ [tool.setuptools.packages.find]
38
+ # This section is managed by the cookiecutter templates.
39
+ where = ["."]
40
+ include = ["pulpcore.cli.*"]
41
+ namespaces = true
42
+
43
+ [tool.setuptools.package-data]
44
+ # This section is managed by the cookiecutter templates.
45
+ "*" = ["py.typed", "locale/*/LC_MESSAGES/*.mo"]
46
+
47
+
48
+ [tool.pulp_cli_template]
49
+ # This section is co-managed by the cookiecutter templates.
50
+ # Changes to existing keys should be preserved.
51
+ app_label = "deb"
52
+ repository = "https://github.com/pulp/pulp-cli-deb"
53
+ glue = true
54
+ docs = false
55
+ translations = true
56
+ main_package = "deb"
57
+ binary_dependencies = ""
58
+
59
+ [tool.towncrier]
60
+ # This section is managed by the cookiecutter templates.
61
+ filename = "CHANGES.md"
62
+ directory = "CHANGES/"
63
+ title_format = "## {version} ({project_date}) {{: #{version} }}"
64
+ template = "CHANGES/.TEMPLATE.md"
65
+ issue_format = "[#{issue}](https://github.com/pulp/pulp-cli-deb/issues/{issue})"
66
+ start_string = "[//]: # (towncrier release notes start)\n"
67
+ underlines = ["", "", ""]
68
+
69
+ [[tool.towncrier.section]]
70
+ # This section is managed by the cookiecutter templates.
71
+ path = ""
72
+ name = ""
73
+
74
+ [[tool.towncrier.section]]
75
+ # This section is managed by the cookiecutter templates.
76
+ path = "pulp-glue-deb"
77
+ name = "Pulp-deb GLUE"
78
+
79
+ [[tool.towncrier.type]]
80
+ # This section is managed by the cookiecutter templates.
81
+ directory = "feature"
82
+ name = "Features"
83
+ showcontent = true
84
+
85
+ [[tool.towncrier.type]]
86
+ # This section is managed by the cookiecutter templates.
87
+ directory = "bugfix"
88
+ name = "Bugfixes"
89
+ showcontent = true
90
+
91
+ [[tool.towncrier.type]]
92
+ # This section is managed by the cookiecutter templates.
93
+ directory = "removal"
94
+ name = "Deprecations and Removals"
95
+ showcontent = true
96
+
97
+ [[tool.towncrier.type]]
98
+ # This section is managed by the cookiecutter templates.
99
+ directory = "translation"
100
+ name = "Translations"
101
+ showcontent = true
102
+
103
+ [[tool.towncrier.type]]
104
+ # This section is managed by the cookiecutter templates.
105
+ directory = "devel"
106
+ name = "Developer Notes"
107
+ showcontent = true
108
+
109
+ [[tool.towncrier.type]]
110
+ # This section is managed by the cookiecutter templates.
111
+ directory = "misc"
112
+ name = "Misc"
113
+ showcontent = false
114
+
115
+
116
+ [tool.black]
117
+ # This section is managed by the cookiecutter templates.
118
+ line-length = 100
119
+
120
+ [tool.isort]
121
+ # This section is managed by the cookiecutter templates.
122
+ profile = "black"
123
+ line_length = 100
124
+ skip = ["pulp-glue-deb"]
125
+
126
+ [tool.pytest.ini_options]
127
+ markers = [
128
+ "script: tests provided as shell scripts",
129
+ "help_page: tests that render help pages",
130
+ "pulp_deb: pulp_deb tests",
131
+ ]
132
+
133
+ [tool.mypy]
134
+ # This section is managed by the cookiecutter templates.
135
+ strict = true
136
+ warn_unused_ignores = false
137
+ show_error_codes = true
138
+ files = "pulpcore/**/*.py, tests/*.py"
139
+ namespace_packages = true
140
+ explicit_package_bases = true
141
+
142
+ [[tool.mypy.overrides]]
143
+ # This section is managed by the cookiecutter templates.
144
+ module = [
145
+ "click_shell.*",
146
+ "gnupg.*",
147
+ "IPython.*",
148
+ "schema.*",
149
+ ]
150
+ ignore_missing_imports = true
151
+
152
+ [tool.bumpversion]
153
+ # This section is managed by the cookiecutter templates.
154
+ current_version = "0.2.0"
155
+ commit = false
156
+ tag = false
157
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\.(?P<release>[a-z]+))?"
158
+ serialize = [
159
+ "{major}.{minor}.{patch}.{release}",
160
+ "{major}.{minor}.{patch}",
161
+ ]
162
+
163
+ [tool.bumpversion.parts.release]
164
+ # This section is managed by the cookiecutter templates.
165
+ optional_value = "prod"
166
+ values = [
167
+ "dev",
168
+ "prod",
169
+ ]
170
+
171
+ [[tool.bumpversion.files]]
172
+ # This section is managed by the cookiecutter templates.
173
+ filename = "./pulp-glue-deb/pulp_glue/deb/__init__.py"
174
+ search = "__version__ = \"{current_version}\""
175
+ replace = "__version__ = \"{new_version}\""
176
+
177
+ [[tool.bumpversion.files]]
178
+ # This section is managed by the cookiecutter templates.
179
+ filename = "./pulpcore/cli/deb/__init__.py"
180
+ search = "__version__ = \"{current_version}\""
181
+ replace = "__version__ = \"{new_version}\""
182
+
183
+ [[tool.bumpversion.files]]
184
+ # This section is managed by the cookiecutter templates.
185
+ filename = "./pulp-glue-deb/pyproject.toml"
186
+ search = "version = \"{current_version}\""
187
+ replace = "version = \"{new_version}\""
188
+
189
+ [[tool.bumpversion.files]]
190
+ # This section is managed by the cookiecutter templates.
191
+ filename = "./pyproject.toml"
192
+ search = "version = \"{current_version}\""
193
+ replace = "version = \"{new_version}\""
194
+
195
+ [[tool.bumpversion.files]]
196
+ # This section is managed by the cookiecutter templates.
197
+ filename = "./pyproject.toml"
198
+ search = "\"pulp-glue-deb=={current_version}\""
199
+ replace = "\"pulp-glue-deb=={new_version}\""
200
+
201
+
202
+ [tool.flake8]
203
+ # This section is managed by the cookiecutter templates.
204
+ exclude = ["./docs/*"]
205
+ ignore = ["W503", "Q000", "Q003", "D100", "D104", "D106", "D200", "D202", "D205", "D400", "D401", "D402"]
206
+ # E203: whitespace before ':'; https://github.com/psf/black/issues/279
207
+ # E401: multiple imports on one line
208
+ extend-ignore = ["E203", "E401"]
209
+ max-line-length = 100
210
+
@@ -1,2 +0,0 @@
1
- pulp-cli<0.24.0.dev,>=0.18.2
2
- pulp-glue-deb==0.0.7
@@ -1,148 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "pulp-cli-deb"
7
- version = "0.0.7"
8
- description = "Command line interface to talk to pulpcore's REST API. (Deb plugin commands)"
9
- readme = "README.md"
10
- requires-python = ">=3.6"
11
- license = {text = "GPLv2+"}
12
- authors = [
13
- {name = "Pulp Team", email = "pulp-list@redhat.com"},
14
- ]
15
- classifiers=[
16
- "Development Status :: 4 - Beta",
17
- "Environment :: Console",
18
- "Intended Audience :: System Administrators",
19
- "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
20
- "Operating System :: OS Independent",
21
- "Programming Language :: Python :: 3",
22
- "Topic :: System :: Software Distribution",
23
- "Typing :: Typed",
24
- ]
25
- dependencies = [
26
- "pulp-cli>=0.18.2,<0.24.0.dev",
27
- "pulp-glue-deb==0.0.7",
28
- ]
29
-
30
- [project.urls]
31
- repository = "https://github.com/pulp/pulp-cli-deb"
32
- changelog = "https://github.com/pulp/pulp-cli-deb/blob/main/CHANGES.md"
33
-
34
- [project.entry-points."pulp_cli.plugins"]
35
- deb = "pulpcore.cli.deb"
36
-
37
- [tool.setuptools.packages.find]
38
- where = ["."]
39
- include = ["pulpcore.cli.*"]
40
- namespaces = true
41
-
42
- [tool.setuptools.package-data]
43
- "*" = ["py.typed", "locale/*/LC_MESSAGES/*.mo"]
44
-
45
- [tool.pulp_cli_template]
46
- app_label = "deb"
47
- glue = true
48
- docs = false
49
- translations = true
50
- test_matrix = """
51
- - python: "3.9"
52
- image_tag: "nightly"
53
- pulp_api_root: "/relocated/djnd/"
54
- - python: "3.6"
55
- image_tag: "3.21"
56
- - python: "3.7"
57
- image_tag: "3.20"
58
- lower_bounds: true
59
- - python: "3.8"
60
- image_tag: "3.19"
61
- - python: "3.11"
62
- image_tag: "3.18"
63
- - python: "3.10"
64
- image_tag: "3.22"
65
- lower_bounds: true
66
- """
67
-
68
- [tool.towncrier]
69
- filename = "CHANGES.md"
70
- directory = "CHANGES/"
71
- title_format = "## {version} ({project_date})"
72
- template = "CHANGES/.TEMPLATE.md"
73
- issue_format = "[#{issue}](https://github.com/pulp/pulp-cli-deb/issues/{issue})"
74
- start_string = "[//]: # (towncrier release notes start)\n"
75
- underlines = ["", "", ""]
76
-
77
-
78
- [[tool.towncrier.section]]
79
- path = ""
80
- name = ""
81
-
82
- [[tool.towncrier.section]]
83
- path = "pulp-glue-deb"
84
- name = "Pulp GLUE deb"
85
-
86
- [[tool.towncrier.type]]
87
- directory = "feature"
88
- name = "Features"
89
- showcontent = true
90
-
91
- [[tool.towncrier.type]]
92
- directory = "bugfix"
93
- name = "Bugfixes"
94
- showcontent = true
95
-
96
- [[tool.towncrier.type]]
97
- directory = "doc"
98
- name = "Improved Documentation"
99
- showcontent = true
100
-
101
- [[tool.towncrier.type]]
102
- directory = "removal"
103
- name = "Deprecations and Removals"
104
- showcontent = true
105
-
106
- [[tool.towncrier.type]]
107
- directory = "translation"
108
- name = "Translations"
109
- showcontent = true
110
-
111
- [[tool.towncrier.type]]
112
- directory = "devel"
113
- name = "Developer Notes"
114
- showcontent = true
115
-
116
- [[tool.towncrier.type]]
117
- directory = "misc"
118
- name = "Misc"
119
- showcontent = false
120
-
121
- [tool.black]
122
- target = "py36"
123
- line-length = 100
124
-
125
- [tool.isort]
126
- profile = "black"
127
- line_length = 100
128
-
129
- [tool.pytest.ini_options]
130
- markers = [
131
- "script: tests provided as shell scripts",
132
- "help_page: tests that render help pages",
133
- "pulp_deb: pulp_deb tests",
134
- ]
135
-
136
- [tool.mypy]
137
- strict = true
138
- show_error_codes = true
139
- files = "pulpcore/**/*.py"
140
- namespace_packages = true
141
- explicit_package_bases = true
142
-
143
- [[tool.mypy.overrides]]
144
- module = [
145
- "click_shell.*",
146
- "schema.*",
147
- ]
148
- ignore_missing_imports = true
File without changes