-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
26 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ readme = "README.rst" | |
authors = [ | ||
{name = "Akinori Hattori", email = "[email protected]"}, | ||
] | ||
license = {"text" = "MIT"} | ||
license = {text = "MIT"} | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
|
@@ -66,7 +66,9 @@ Homepage = "https://github.com/hattya/scmver" | |
|
||
[tool.setuptools] | ||
include-package-data = false | ||
packages = ["scmver"] | ||
packages = [ | ||
"scmver", | ||
] | ||
|
||
[tool.setuptools.package-data] | ||
scmver = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# scmver.setuptools | ||
# | ||
# Copyright (c) 2019-2023 Akinori Hattori <[email protected]> | ||
# Copyright (c) 2019-2024 Akinori Hattori <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
@@ -18,8 +18,7 @@ | |
|
||
|
||
def finalize_version(dist: setuptools.Distribution) -> None: | ||
scmver = core.load_project() | ||
if scmver is not None: | ||
if (scmver := core.load_project()) is not None: | ||
dist.metadata.version = core.get_version(**scmver) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# scmver.subversion | ||
# | ||
# Copyright (c) 2019-2023 Akinori Hattori <[email protected]> | ||
# Copyright (c) 2019-2024 Akinori Hattori <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
@@ -167,8 +167,7 @@ def version() -> Tuple[Union[int, str], ...]: | |
|
||
|
||
def run(*args: str, **kwargs: Any) -> Tuple[Union[str, ET.Element], str]: | ||
xml = '--xml' in args | ||
if xml: | ||
if xml := '--xml' in args: | ||
kwargs['encoding'] = 'utf-8' | ||
out, err = util.exec_((cast(str, util.which('svn')), '--non-interactive') + args, **kwargs) | ||
return ET.fromstring(out.encode('utf-8')) if xml else out, err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# base | ||
# | ||
# Copyright (c) 2019-2022 Akinori Hattori <[email protected]> | ||
# Copyright (c) 2019-2024 Akinori Hattori <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
@@ -30,8 +30,7 @@ def tearDownClass(cls): | |
locale.setlocale(locale.LC_ALL, cls._lc) | ||
|
||
def check_locale(self): | ||
encoding = locale.getpreferredencoding(False) | ||
if encoding.lower() not in ('cp932', 'euc-jp', 'utf-8'): | ||
if locale.getpreferredencoding(False).lower() not in ('cp932', 'euc-jp', 'utf-8'): | ||
self.skipTest('requires UTF-8 or Japanese locale') | ||
|
||
def tempdir(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters