-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch project to an
src/
based layout
- Loading branch information
Showing
56 changed files
with
94 additions
and
63 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Switch project to an ``src/`` based layout |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
""" | ||
NG PyTest Salt Plugin | ||
""" | ||
# pragma: nocover | ||
import pathlib | ||
import re | ||
import sys | ||
|
||
try: | ||
from .version import __version__ | ||
except ImportError: | ||
__version__ = "0.0.0.not-installed" | ||
try: | ||
from importlib.metadata import version, PackageNotFoundError | ||
|
||
try: | ||
__version__ = version("pytest-salt-factories") | ||
except PackageNotFoundError: | ||
# package is not installed | ||
pass | ||
except ImportError: | ||
try: | ||
from importlib_metadata import version, PackageNotFoundError | ||
|
||
try: | ||
__version__ = version("pytest-salt-factories") | ||
except PackageNotFoundError: | ||
# package is not installed | ||
pass | ||
except ImportError: | ||
try: | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
|
||
try: | ||
__version__ = get_distribution("pytest-salt-factories").version | ||
except DistributionNotFound: | ||
# package is not installed | ||
pass | ||
except ImportError: | ||
# pkg resources isn't even available?! | ||
pass | ||
|
||
|
||
# Define __version_info__ attribute | ||
VERSION_INFO_REGEX = re.compile( | ||
r"(?P<year>[\d]{4})\.(?P<month>[\d]{1,2})\.(?P<day>[\d]{1,2})" | ||
r"(?:\.dev0\+(?P<commits>[\d]+)\.(?:.*))?" | ||
) | ||
try: | ||
__version_info__ = tuple([int(p) for p in VERSION_INFO_REGEX.match(__version__).groups() if p]) | ||
except AttributeError: | ||
__version_info__ = (-1, -1, -1) | ||
finally: | ||
del VERSION_INFO_REGEX | ||
|
||
|
||
# Define some constants | ||
CODE_ROOT_DIR = pathlib.Path(__file__).resolve().parent | ||
IS_WINDOWS = sys.platform.startswith("win") | ||
IS_DARWIN = IS_OSX = sys.platform.startswith("darwin") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.