Switch versioning plugin

This commit is contained in:
Paul Pfeister 2024-05-17 20:57:37 -04:00
parent 8fee9a9714
commit b485001fcb
No known key found for this signature in database
GPG key ID: 70D33A96CBD7A994
4 changed files with 25 additions and 22 deletions

View file

@ -1,23 +1,14 @@
[build-system]
requires = [ "poetry-core>=1.6.0", "poetry-dynamic-versioning>1.0.0,<2.0.0" ]
build-backend = "poetry_dynamic_versioning.backend"
requires = [ "poetry-core>=1.2.0" ]
build-backend = "poetry.core.masonry.api"
# poetry-core 1.8 not available in .fc39. Can upgrade to 1.8.0 at .fc39 EOL
[tool.poetry-dynamic-versioning]
enable = false
metadata = false
strict = true
vcs = "git"
# Matched tags:
# v0.0.0 followed by optional -rc0 (release candidate) OR -b0 (public beta)
pattern = "^v(?P<base>\\d+(?:\\.\\d+){2})(?:-(?P<stage>(?:rc|b)\\d+?))??$"
[tool.poetry-dynamic-versioning.substitution]
folders = [ { path = "sherlock" } ]
[tool.poetry-version-plugin]
source = "init"
[tool.poetry]
name = "sherlock-project"
version = "0.14.4"
version = "0" # single source of truth is __version__.py
description = "Hunt down social media accounts by username across social networks"
license = "MIT"
authors = [

View file

@ -4,3 +4,7 @@ This module contains the main logic to search for usernames at social
networks.
"""
__shortname__ = "Sherlock"
__longname__ = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.14.4"

View file

@ -14,8 +14,8 @@ if __name__ == "__main__":
# Check if the user is using the correct version of Python
python_version = sys.version.split()[0]
if sys.version_info < (3, 6):
print(f"Sherlock requires Python 3.6+\nYou are using Python {python_version}, which is not supported by Sherlock.")
if sys.version_info < (3, 8):
print(f"Sherlock requires Python 3.8+\nYou are using Python {python_version}, which is not supported by Sherlock.")
sys.exit(1)
from sherlock import sherlock

View file

@ -19,6 +19,17 @@ from time import monotonic
import requests
# Removing __version__ here will trigger update message for users
# Do not remove until ready to trigger that message
__version__ = "0.14.4"
del __version__
from .__init__ import (
__shortname__,
__longname__,
__version__
)
from requests_futures.sessions import FuturesSession
from torrequest import TorRequest
from sherlock.result import QueryStatus
@ -28,9 +39,6 @@ from sherlock.sites import SitesInformation
from colorama import init
from argparse import ArgumentTypeError
module_name = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.14.4"
class SherlockFuturesSession(FuturesSession):
def request(self, method, url, hooks=None, *args, **kwargs):
@ -510,14 +518,14 @@ def handler(signal_received, frame):
def main():
version_string = (
f"Sherlock {__version__}\n"
f"{__shortname__} {__version__}\n"
+ f"Requests {requests.__version__}\n"
+ f"Python {platform.python_version()}"
)
parser = ArgumentParser(
formatter_class=RawDescriptionHelpFormatter,
description=f"{module_name} (Version {__version__})",
description=f"{__longname__} (Version {__version__})",
)
parser.add_argument(
"--version",