From 3f7d42d433586fcbfa530c8ba76b33426aabeb77 Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Thu, 1 Oct 2020 10:26:55 +0200 Subject: [PATCH] prep for new release (#27) --- .gitignore | 2 +- setup.py | 29 ++++++++++++++++++++++------- tell_me_your_secrets/__init__.py | 3 +-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9630986..0b9768d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ Output/ *.pyc .DS_Store -build/ +/build/ # Setuptools distribution folder. /dist/ diff --git a/setup.py b/setup.py index 02b5820..f6d9151 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,30 @@ +import os +from typing import List + import setuptools -with open('Readme.md') as fh: - long_description = fh.read() -with open('requirements.txt') as f: - required = f.read().splitlines() +def get_long_description() -> str: + with open('README.md') as fh: + return fh.read() + + +def get_required() -> List[str]: + with open('requirements.txt') as fh: + return fh.read().splitlines() + + +def get_version(): + with open(os.path.join('tell_me_your_secrets', '__init__.py')) as fh: + for line in fh: + if line.startswith('__version__ = '): + return line.split()[-1].strip().strip("'") + setuptools.setup( name='tell_me_your_secrets', packages=setuptools.find_packages(), - version='1.78', + version=get_version(), license='MIT', description='A simple module which finds files with different secrets keys present inside a directory.' 'Secrets derived from 120 different signatures.', @@ -17,10 +32,10 @@ include_package_data=True, author_email='valaygaurang@gmail.com', url='https://github.com/valayDave/tell-me-your-secrets', - long_description=long_description, + long_description=get_long_description(), long_description_content_type='text/markdown', keywords=['Security', 'SSH', 'Secret Keys', 'SysAdmin'], - install_requires=required, + install_requires=get_required(), python_requires='>=3.6', entry_points={ 'console_scripts': ['tell-me-your-secrets=tell_me_your_secrets.__main__:run_service'], diff --git a/tell_me_your_secrets/__init__.py b/tell_me_your_secrets/__init__.py index ac0937a..afced14 100644 --- a/tell_me_your_secrets/__init__.py +++ b/tell_me_your_secrets/__init__.py @@ -1,2 +1 @@ -#!/usr/bin/env python -version = '1.7' +__version__ = '2.0.0'