Switch versioning plugin

pull/2111/head
Paul Pfeister 8 months ago
parent 8fee9a9714
commit b485001fcb
No known key found for this signature in database
GPG Key ID: 70D33A96CBD7A994

@ -1,23 +1,14 @@
[build-system] [build-system]
requires = [ "poetry-core>=1.6.0", "poetry-dynamic-versioning>1.0.0,<2.0.0" ] requires = [ "poetry-core>=1.2.0" ]
build-backend = "poetry_dynamic_versioning.backend" build-backend = "poetry.core.masonry.api"
# poetry-core 1.8 not available in .fc39. Can upgrade to 1.8.0 at .fc39 EOL # poetry-core 1.8 not available in .fc39. Can upgrade to 1.8.0 at .fc39 EOL
[tool.poetry-dynamic-versioning] [tool.poetry-version-plugin]
enable = false source = "init"
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] [tool.poetry]
name = "sherlock-project" 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" description = "Hunt down social media accounts by username across social networks"
license = "MIT" license = "MIT"
authors = [ authors = [

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

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

@ -19,6 +19,17 @@ from time import monotonic
import requests 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 requests_futures.sessions import FuturesSession
from torrequest import TorRequest from torrequest import TorRequest
from sherlock.result import QueryStatus from sherlock.result import QueryStatus
@ -28,9 +39,6 @@ from sherlock.sites import SitesInformation
from colorama import init from colorama import init
from argparse import ArgumentTypeError from argparse import ArgumentTypeError
module_name = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.14.4"
class SherlockFuturesSession(FuturesSession): class SherlockFuturesSession(FuturesSession):
def request(self, method, url, hooks=None, *args, **kwargs): def request(self, method, url, hooks=None, *args, **kwargs):
@ -510,14 +518,14 @@ def handler(signal_received, frame):
def main(): def main():
version_string = ( version_string = (
f"Sherlock {__version__}\n" f"{__shortname__} {__version__}\n"
+ f"Requests {requests.__version__}\n" + f"Requests {requests.__version__}\n"
+ f"Python {platform.python_version()}" + f"Python {platform.python_version()}"
) )
parser = ArgumentParser( parser = ArgumentParser(
formatter_class=RawDescriptionHelpFormatter, formatter_class=RawDescriptionHelpFormatter,
description=f"{module_name} (Version {__version__})", description=f"{__longname__} (Version {__version__})",
) )
parser.add_argument( parser.add_argument(
"--version", "--version",

Loading…
Cancel
Save