dependabot-python 0.106.8 → 0.106.9
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91d7e85b60cc2e3dc93e55f21c629c99d70b3d71d827bf8551d35882360eb1cc
|
4
|
+
data.tar.gz: 334f99f068b85448d74568e05f7a6f3500a25ad26f6b2f0bdd812ed5123b73f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe92a2fa7b6becd51a80666202bbf5a548f829ae1cee97b9c23cc362976994897f00275111361e084fb57a3903ee383993f252dc2f149654ce3bfa533c272c8c
|
7
|
+
data.tar.gz: 45f424d8874d2017fc2a8570b8a4092e4c05d3380d3483f0cdeae3ddd5521182a2822d0d4d5f2d1b6ad8c656797b666b7ba45091741b4243d72d09c58aa4788e
|
data/helpers/requirements.txt
CHANGED
@@ -205,27 +205,32 @@ module Dependabot
|
|
205
205
|
|
206
206
|
def write_updated_dependency_files
|
207
207
|
dependency_files.each do |file|
|
208
|
-
|
209
|
-
|
210
|
-
|
208
|
+
next if irrelevant_pyproject?(file)
|
209
|
+
|
210
|
+
FileUtils.mkdir_p(Pathname.new(file.name).dirname)
|
211
|
+
File.write(file.name, freeze_dependency_requirement(file))
|
211
212
|
end
|
212
213
|
|
213
214
|
# Overwrite the .python-version with updated content
|
214
215
|
File.write(".python-version", python_version)
|
215
216
|
|
216
217
|
setup_files.each do |file|
|
217
|
-
|
218
|
-
|
219
|
-
File.write(path, sanitized_setup_file_content(file))
|
218
|
+
FileUtils.mkdir_p(Pathname.new(file.name).dirname)
|
219
|
+
File.write(file.name, sanitized_setup_file_content(file))
|
220
220
|
end
|
221
221
|
|
222
222
|
setup_cfg_files.each do |file|
|
223
|
-
|
224
|
-
|
225
|
-
File.write(path, "[metadata]\nname = sanitized-package\n")
|
223
|
+
FileUtils.mkdir_p(Pathname.new(file.name).dirname)
|
224
|
+
File.write(file.name, "[metadata]\nname = sanitized-package\n")
|
226
225
|
end
|
227
226
|
end
|
228
227
|
|
228
|
+
def irrelevant_pyproject?(file)
|
229
|
+
return false unless file.name == "pyproject.toml"
|
230
|
+
|
231
|
+
!file.content.include?("build-backend")
|
232
|
+
end
|
233
|
+
|
229
234
|
def install_required_python
|
230
235
|
if run_command("pyenv versions").include?("#{python_version}\n")
|
231
236
|
return
|
@@ -247,33 +247,40 @@ module Dependabot
|
|
247
247
|
message.include?('Command "python setup.py egg_info" failed')
|
248
248
|
end
|
249
249
|
|
250
|
+
# rubocop:disable Metrics/AbcSize
|
250
251
|
def write_temporary_dependency_files(updated_req: nil,
|
251
252
|
update_requirement: true)
|
252
253
|
dependency_files.each do |file|
|
253
|
-
|
254
|
-
|
254
|
+
next if irrelevant_pyproject?(file)
|
255
|
+
|
256
|
+
FileUtils.mkdir_p(Pathname.new(file.name).dirname)
|
255
257
|
updated_content =
|
256
258
|
if update_requirement then update_req_file(file, updated_req)
|
257
259
|
else file.content
|
258
260
|
end
|
259
|
-
File.write(
|
261
|
+
File.write(file.name, updated_content)
|
260
262
|
end
|
261
263
|
|
262
264
|
# Overwrite the .python-version with updated content
|
263
265
|
File.write(".python-version", python_version)
|
264
266
|
|
265
267
|
setup_files.each do |file|
|
266
|
-
|
267
|
-
|
268
|
-
File.write(path, sanitized_setup_file_content(file))
|
268
|
+
FileUtils.mkdir_p(Pathname.new(file.name).dirname)
|
269
|
+
File.write(file.name, sanitized_setup_file_content(file))
|
269
270
|
end
|
270
271
|
|
271
272
|
setup_cfg_files.each do |file|
|
272
|
-
|
273
|
-
|
274
|
-
File.write(path, "[metadata]\nname = sanitized-package\n")
|
273
|
+
FileUtils.mkdir_p(Pathname.new(file.name).dirname)
|
274
|
+
File.write(file.name, "[metadata]\nname = sanitized-package\n")
|
275
275
|
end
|
276
276
|
end
|
277
|
+
# rubocop:enable Metrics/AbcSize
|
278
|
+
|
279
|
+
def irrelevant_pyproject?(file)
|
280
|
+
return false unless file.name == "pyproject.toml"
|
281
|
+
|
282
|
+
!file.content.include?("build-backend")
|
283
|
+
end
|
277
284
|
|
278
285
|
def install_required_python
|
279
286
|
if run_command("pyenv versions").include?("#{python_version}\n")
|
@@ -404,6 +411,7 @@ module Dependabot
|
|
404
411
|
updated_files =
|
405
412
|
dependency_files.map do |file|
|
406
413
|
next file if file.name == ".python-version"
|
414
|
+
next file if file.name == "pyproject.toml"
|
407
415
|
|
408
416
|
updated_file = file.dup
|
409
417
|
updated_file.content = File.read(file.name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.106.
|
4
|
+
version: 0.106.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.106.
|
19
|
+
version: 0.106.9
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.106.
|
26
|
+
version: 0.106.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|