dependabot-python 0.79.3 → 0.79.4

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: 8a9a3b1608cf8227ff8727277792c2dd7bb1332d9708f80dfc84bb41ee990957
4
- data.tar.gz: bf4070fcebbef332f5fa83e88395ece8fbe8fcb6fe431bd7de072519d061c940
3
+ metadata.gz: 9b8342d75c717b59efb17606b4ee69390ea8769f125de9595208cf768c054da6
4
+ data.tar.gz: '06328512c3e119123e7028ac22f7a1519184862adf2762e3ec11cc5ea2a57083'
5
5
  SHA512:
6
- metadata.gz: e12a48e5026a046a9631dffd80ee8fc628df8c6b81307babd297139e4c1ce01bcf1223f1a10eb28478dea20a8a9a83458a85d77f4bad64d5fbf8b805e9fc1f8a
7
- data.tar.gz: 9f9f66904b72682f8cc37d8c9d8908922ef4f3218fe9814ef9415f6f3a5cff7f86eafb7f67d554c19f3772940f4cfb4dab847388f469060b60d98643b9aea1a5
6
+ metadata.gz: a161c47427d71935042ecd409d37fa2e79baed8083bd1720441cb37fadf55cc85ccaa3e34aff7835e57b67b0c029a28183d8c42475de97f49d0253e683fc774b
7
+ data.tar.gz: 9c7ceeb0486d8431f6f1130e1e3e6f601fe8d711f46556be844208245e4fee9ff352454a2f4d48ccb576f55f152e0105bc255594d8bf652d7a73046528f574b4
@@ -152,9 +152,8 @@ module Dependabot
152
152
  if python_version && !pre_installed_python?(python_version)
153
153
  run_poetry_command("pyenv install -s")
154
154
  run_poetry_command("pyenv exec pip install --upgrade pip")
155
- run_poetry_command(
156
- "pyenv exec pip install -r #{python_requirements_path}"
157
- )
155
+ run_poetry_command("pyenv exec pip install -r " + \
156
+ NativeHelpers.python_requirements_path)
158
157
  end
159
158
 
160
159
  run_poetry_command("pyenv exec poetry lock")
@@ -271,11 +270,6 @@ module Dependabot
271
270
  def python_version_file
272
271
  dependency_files.find { |f| f.name == ".python-version" }
273
272
  end
274
-
275
- def python_requirements_path
276
- project_root = File.join(File.dirname(__FILE__), "../../../../..")
277
- File.join(project_root, "helpers/python/requirements.txt")
278
- end
279
273
  end
280
274
  end
281
275
  end
@@ -4,14 +4,25 @@ module Dependabot
4
4
  module Python
5
5
  module NativeHelpers
6
6
  def self.python_helper_path
7
- helpers_dir = File.join(native_helpers_root, "python/helpers")
8
- Pathname.new(File.join(helpers_dir, "run.py")).cleanpath.to_path
7
+ clean_path(File.join(python_helpers_dir, "run.py"))
8
+ end
9
+
10
+ def self.python_requirements_path
11
+ clean_path(File.join(python_helpers_dir, "requirements.txt"))
12
+ end
13
+
14
+ def self.python_helpers_dir
15
+ File.join(native_helpers_root, "python/helpers")
9
16
  end
10
17
 
11
18
  def self.native_helpers_root
12
19
  default_path = File.join(__dir__, "../../../..")
13
20
  ENV.fetch("DEPENDABOT_NATIVE_HELPERS_PATH", default_path)
14
21
  end
22
+
23
+ def self.clean_path(path)
24
+ Pathname.new(path).cleanpath.to_path
25
+ end
15
26
  end
16
27
  end
17
28
  end
@@ -265,11 +265,6 @@ module Dependabot
265
265
  end
266
266
  end
267
267
 
268
- def python_helper_path
269
- project_root = File.join(File.dirname(__FILE__), "../../../../..")
270
- File.join(project_root, "helpers/python/run.py")
271
- end
272
-
273
268
  # See https://www.python.org/dev/peps/pep-0503/#normalized-names
274
269
  def normalise(name)
275
270
  name.downcase.gsub(/[-_.]+/, "-")
@@ -3,14 +3,15 @@
3
3
  require "excon"
4
4
  require "toml-rb"
5
5
 
6
+ require "dependabot/errors"
7
+ require "dependabot/shared_helpers"
6
8
  require "dependabot/python/file_parser"
7
9
  require "dependabot/python/file_updater/pipfile_preparer"
8
10
  require "dependabot/python/file_updater/setup_file_sanitizer"
9
11
  require "dependabot/python/update_checker"
10
12
  require "dependabot/python/python_versions"
11
- require "dependabot/shared_helpers"
13
+ require "dependabot/python/native_helpers"
12
14
  require "dependabot/python/version"
13
- require "dependabot/errors"
14
15
 
15
16
  # rubocop:disable Metrics/ClassLength
16
17
  module Dependabot
@@ -350,7 +351,8 @@ module Dependabot
350
351
  return if pre_installed_python?(python_version)
351
352
 
352
353
  SharedHelpers.run_shell_command(
353
- "pyenv exec pip install -r #{python_requirements_path}"
354
+ "pyenv exec pip install -r " + \
355
+ NativeHelpers.python_requirements_path
354
356
  )
355
357
  end
356
358
 
@@ -522,11 +524,6 @@ module Dependabot
522
524
  environment_variables.join(" ") + " "
523
525
  end
524
526
 
525
- def python_requirements_path
526
- project_root = File.join(File.dirname(__FILE__), "../../../..")
527
- File.join(project_root, "helpers/python/requirements.txt")
528
- end
529
-
530
527
  # See https://www.python.org/dev/peps/pep-0503/#normalized-names
531
528
  def normalise(name)
532
529
  name.downcase.gsub(/[-_.]+/, "-")
@@ -3,13 +3,13 @@
3
3
  require "excon"
4
4
  require "toml-rb"
5
5
 
6
+ require "dependabot/errors"
7
+ require "dependabot/shared_helpers"
6
8
  require "dependabot/python/file_parser"
7
9
  require "dependabot/python/file_updater/pyproject_preparer"
8
10
  require "dependabot/python/update_checker"
9
- require "dependabot/shared_helpers"
10
11
  require "dependabot/python/version"
11
12
  require "dependabot/python/requirement"
12
- require "dependabot/errors"
13
13
  require "dependabot/python/native_helpers"
14
14
  require "dependabot/python/python_versions"
15
15
 
@@ -55,9 +55,8 @@ module Dependabot
55
55
 
56
56
  if python_version && !pre_installed_python?(python_version)
57
57
  run_poetry_command("pyenv install -s")
58
- run_poetry_command(
59
- "pyenv exec pip install -r #{python_requirements_path}"
60
- )
58
+ run_poetry_command("pyenv exec pip install -r " + \
59
+ NativeHelpers.python_requirements_path)
61
60
  end
62
61
 
63
62
  # Shell out to Poetry, which handles everything for us.
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.79.3
4
+ version: 0.79.4
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.79.3
19
+ version: 0.79.4
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.79.3
26
+ version: 0.79.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement