Remove unused usage of pkg_resources
pbr is in requirements now so should always exist. pkg_resourcs was removed in Python 3.12 [1] and can no longer be used. [1] https://docs.python.org/3/whatsnew/3.12.html#ensurepip Change-Id: I1f1d5c75f10b6f232dd2bf23fc963693f8388f98
This commit is contained in:
parent
a8b48d6e02
commit
dbf8be4edb
@ -14,19 +14,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import pkg_resources
|
||||
from pbr import version as pbr_version
|
||||
|
||||
TASK_VENDOR = "OpenStack Foundation"
|
||||
TASK_PRODUCT = "OpenStack TaskFlow"
|
||||
TASK_PACKAGE = None # OS distro package version suffix
|
||||
|
||||
try:
|
||||
from pbr import version as pbr_version
|
||||
_version_info = pbr_version.VersionInfo('taskflow')
|
||||
version_string = _version_info.version_string
|
||||
except ImportError:
|
||||
_version_info = pkg_resources.get_distribution('taskflow')
|
||||
version_string = lambda: _version_info.version
|
||||
_version_info = pbr_version.VersionInfo('taskflow')
|
||||
version_string = _version_info.version_string
|
||||
|
||||
|
||||
def version_string_with_package():
|
||||
|
Loading…
Reference in New Issue
Block a user