Skip to content

Commit

Permalink
Fixed noxfile versions and location of the license file
Browse files Browse the repository at this point in the history
  • Loading branch information
kkalinowski-reef committed Dec 21, 2023
1 parent e8c26ed commit 9601008
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions b2/_internal/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3723,7 +3723,7 @@ class License(Command): # pragma: no cover
"""
Prints the license of B2 Command line tool and all libraries shipped with it.
"""
LICENSE_OUTPUT_FILE = pathlib.Path(__file__).parent / 'licenses_output.txt'
LICENSE_OUTPUT_FILE = pathlib.Path(__file__).parent.parent / 'licenses_output.txt'

REQUIRES_AUTH = False
IGNORE_MODULES = {'b2', 'distlib', 'patchelf-wrapper', 'platformdirs'}
Expand Down Expand Up @@ -3810,7 +3810,7 @@ def _put_license_text(self, stream: io.StringIO, with_packages: bool = False):
files_table.add_row([file_name, file_content])
stream.write(str(files_table))
stream.write(f'\n\n{NAME} license:\n')
b2_license_file_text = (pathlib.Path(__file__).parent /
b2_license_file_text = (pathlib.Path(__file__).parent.parent /
'LICENSE').read_text(encoding='utf8')
stream.write(b2_license_file_text)

Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@

def get_versions() -> List[str]:
"""
"Almost" a copy of b2/version_listing.py:get_versions(), because importing
"Almost" a copy of b2/_internalg/version_listing.py:get_versions(), because importing
the file directly seems impossible from the noxfile.
"""
return [path.name for path in sorted((pathlib.Path(__file__).parent / 'b2').glob('*b2v*'))]
return [path.name for path in sorted((pathlib.Path(__file__).parent / 'b2' / '_internal').glob('*b2v*'))]


@nox.session(venv_backend='none')
Expand Down

0 comments on commit 9601008

Please sign in to comment.