-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from jan-cerny/py36
Make openscap-report compatible with Python 3.6
- Loading branch information
Showing
31 changed files
with
1,376 additions
and
41 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 |
---|---|---|
|
@@ -56,7 +56,7 @@ Installation from source | |
|
||
Requirements: | ||
|
||
* Python 3.8+ | ||
* Python 3.6+ | ||
* `lxml`_ | ||
* `jinja2`_ | ||
|
||
|
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,11 +1,16 @@ | ||
# Copyright 2022, Red Hat, Inc. | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
|
||
from importlib.metadata import PackageNotFoundError, version | ||
from os import path | ||
|
||
DISTRIBUTION_NAME = "openscap-report" | ||
try: | ||
__version__ = version(DISTRIBUTION_NAME) | ||
except PackageNotFoundError: | ||
__version__ = f"Version is unavailable. Please install {DISTRIBUTION_NAME}!" | ||
from importlib.metadata import PackageNotFoundError, version | ||
try: | ||
__version__ = version(DISTRIBUTION_NAME) | ||
except PackageNotFoundError: | ||
__version__ = f"Version is unavailable. Please install {DISTRIBUTION_NAME}!" | ||
except ImportError: | ||
import pkg_resources | ||
try: | ||
__version__ = pkg_resources.get_distribution(DISTRIBUTION_NAME).version | ||
except pkg_resources.DistributionNotFound: | ||
__version__ = f"Version is unavailable. Please install {DISTRIBUTION_NAME}!" |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
try: | ||
from dataclasses import asdict, dataclass, field, replace | ||
except ImportError: | ||
from .dataclasses import asdict, dataclass, field, replace |
Oops, something went wrong.