mirror of https://github.com/MISP/PyMISP
chg: Bump version, make __version__ dynamic
parent
4ed9781c76
commit
5d39d81152
|
@ -1,10 +1,13 @@
|
|||
__version__ = '2.4.176'
|
||||
import logging
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
import importlib.metadata
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__version__ = importlib.metadata.version("pymisp")
|
||||
|
||||
|
||||
def warning_2024():
|
||||
if sys.version_info < (3, 10):
|
||||
|
|
|
@ -265,9 +265,9 @@ class PyMISP:
|
|||
@property
|
||||
def pymisp_version_main(self) -> Dict:
|
||||
"""Get the most recent version of PyMISP from github"""
|
||||
r = requests.get('https://raw.githubusercontent.com/MISP/PyMISP/main/pymisp/__init__.py')
|
||||
r = requests.get('https://raw.githubusercontent.com/MISP/PyMISP/main/pyproject.toml')
|
||||
if r.status_code == 200:
|
||||
version = re.findall("__version__ = '(.*)'", r.text)
|
||||
version = re.findall('version = "(.*)"', r.text)
|
||||
return {'version': version[0]}
|
||||
return {'error': 'Impossible to retrieve the version of the main branch.'}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "pymisp"
|
||||
version = "2.4.176"
|
||||
version = "2.4.178"
|
||||
description = "Python API for MISP."
|
||||
authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
|
||||
license = "BSD-2-Clause"
|
||||
|
|
Loading…
Reference in New Issue