diff --git a/detect_secrets/__init__.py b/detect_secrets/__init__.py index d654b7290..f5eee76e3 100644 --- a/detect_secrets/__init__.py +++ b/detect_secrets/__init__.py @@ -1 +1 @@ -VERSION = '0.13.1+ibm.62.dss' +VERSION = '0.13.1+ibm.63.dss' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..2f2101195 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=40.8.0", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 20648bedd..a08a4b693 100644 --- a/setup.py +++ b/setup.py @@ -8,13 +8,20 @@ from setuptools import find_packages from setuptools import setup -from detect_secrets import VERSION +import re +from pathlib import Path + +def get_version(): + init_path = Path(__file__).parent / "detect_secrets" / "__init__.py" + content = init_path.read_text() + match = re.search(r"^VERSION\s*=\s*['\"]([^'\"]+)['\"]", content, re.MULTILINE) + return match.group(1) setup( name='detect_secrets', packages=find_packages(exclude=(['test*', 'tmp*'])), - version=VERSION, + version=get_version(), description='Tool for detecting secrets in the codebase', long_description=( 'Check out detect-secrets on `GitHub ' +