diff --git a/commit_helper/__main__.py b/commit_helper/__main__.py index 3246115..8ec8497 100755 --- a/commit_helper/__main__.py +++ b/commit_helper/__main__.py @@ -21,11 +21,11 @@ def main(): debug('file_path', file_path, debug_mode) - if args.show_convention_tags is True: + if args.show_convention_tags == True: convention_help_handler(file_path, args, debug_mode) return - elif args.convention is not '': + elif args.convention != '': convention_flag_handler(args, debug_mode) return diff --git a/dev-requirements.txt b/dev-requirements.txt index e7e1fc0..40b7eba 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,31 +1,55 @@ -argh~=0.26.2 -atomicwrites~=1.3.0 -attrs~=19.1.0 -certifi~=2019.3.9 -chardet~=3.0.4 -codacy-coverage~=1.3.11 -codeclimate-test-reporter~=0.2.3 -colorama~=0.4.1 -colored~=1.3.93 -coverage~=4.5.3 -docopt~=0.6.2 -idna~=2.8 -more-itertools~=7.0.0 -pathlib~=1.0.1 -pathtools~=0.1.2 -pip~=19.0.3 -pluggy>=0.9.0 -py~=1.8.0 -pycodestyle~=2.5.0 -pytest~=4.4.0 -pytest-cov~=2.6.1 -pytest-watch~=4.2.0 -pyyaml>=4.2b1 -requests~=2.21.0 -setuptools~=40.8.0 -six~=1.12.0 -urllib3~=1.24.1 -watchdog~=0.9.0 -wheel~=0.33.1 - -twine~=1.13.0 +argh==0.31.3 +atomicwrites==1.4.1 +attrs==24.2.0 +backports.tarfile==1.2.0 +certifi==2024.8.30 +cffi==1.17.1 +chardet==5.2.0 +charset-normalizer==3.4.2 +codacy-coverage==1.3.11 +codeclimate-test-reporter==0.2.3 +colorama==0.4.6 +colored==2.2.4 +coverage==7.6.8 +cryptography==45.0.5 +docopt==0.6.2 +docutils==0.21.2 +exceptiongroup==1.3.0 +idna==3.10 +importlib_metadata==8.7.0 +iniconfig==2.1.0 +jaraco.classes==3.4.0 +jaraco.context==6.0.1 +jaraco.functools==4.2.1 +jeepney==0.9.0 +keyring==25.6.0 +markdown-it-py==3.0.0 +mdurl==0.1.2 +more-itertools==10.5.0 +nh3==0.2.22 +packaging==25.0 +pathlib==1.0.1 +pathtools==0.1.2 +pkginfo==1.12.1.2 +pluggy==1.6.0 +py==1.11.0 +pycodestyle==2.12.1 +pycparser==2.22 +Pygments==2.19.2 +pytest==8.4.1 +pytest-cov==6.2.1 +pytest-watch==4.2.0 +PyYAML==6.0.2 +readme_renderer==44.0 +requests==2.32.3 +requests-toolbelt==1.0.0 +rfc3986==2.0.0 +rich==14.0.0 +SecretStorage==3.3.3 +six==1.16.0 +tomli==2.2.1 +twine==6.0.1 +typing_extensions==4.14.1 +urllib3==2.2.3 +watchdog==6.0.0 +zipp==3.23.0 diff --git a/setup.py b/setup.py index 56e46da..f8bc28e 100644 --- a/setup.py +++ b/setup.py @@ -1,23 +1,23 @@ import os import codecs from os import path -from setuptools import setup -from setuptools import find_packages -from pip._internal.req import parse_requirements +from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) -with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: - README = readme.read() +with open('README.md', encoding='utf-8') as f: + long_description = f.read() + +with open('VERSION.txt', encoding='utf-8') as f: + version = f.read().strip() # allowes setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) -# parse_requirements() returns generator of pip.req.InstallRequirement objects -INSTALL_REQS = parse_requirements('requirements.txt', session='hack') +# load requirements +with open('requirements.txt') as f: + REQUIREMENTS = [line.strip() for line in f if line.strip() and not line.startswith('#')] -# reqs is a list of requirements -REQUIREMENTS = [str(ir.req) for ir in INSTALL_REQS] CLASSIFIERS = [ "Development Status :: 5 - Production/Stable", @@ -36,11 +36,11 @@ name='commit-helper', description="A python program that helps you write commits following commit conventions", # nopep8 url='https://github.com/andre-filho/commit-helper', - long_description=codecs.open('README.md', 'rb', 'utf8').read(), + long_description=long_description, long_description_content_type='text/markdown', author='Andre de Sousa Costa Filho', author_email='andre.filho001@outlook.com', - version=codecs.open('VERSION.txt', 'rb', 'utf8').read(), + version=version, packages=find_packages(), keywords=['commit', 'helper', 'git', 'version', 'versioning'], entry_points={