Skip to content

Commit

Permalink
chore(setup)!: Unified setup.py files in the project
Browse files Browse the repository at this point in the history
  • Loading branch information
c0r0n3r committed Jun 23, 2023
1 parent 9451662 commit 5bc3f51
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
source =
cryptodatahub
updaters
omit =
cryptodatahub/__setup__.py

[report]
exclude_lines =
Expand Down
10 changes: 10 additions & 0 deletions cryptodatahub/__setup__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-

__title__ = 'CryptoDataHub'
__technical_name__ = __title__.lower()
__version__ = '0.8.5'
__description__ = 'Repository of cryptography-related data'
__author__ = 'Szilárd Pfeiffer'
__author_email__ = '[email protected]'
__url__ = 'https://gitlab.com/coroner/' + __technical_name__
__license__ = 'MPL-2.0'
38 changes: 18 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

from setuptools import setup

from cryptodatahub import __setup__


this_directory = os.getenv('REQUIREMENTS_DIR', '')
with open(os.path.join(this_directory, 'requirements.txt')) as f:
install_requirements = f.read().splitlines()
Expand All @@ -15,35 +18,30 @@
long_description = f.read()


test_requirements = [
"coverage",
]


def test_discover():
test_loader = unittest.TestLoader()
test_suite = test_loader.discover('test', pattern='test_*.py')
return test_suite


setup(
name='cryptodatahub',
version='0.8.5',
description='Repository of cryptography-related data',
name=__setup__.__title__,
version=__setup__.__version__,
description=__setup__.__description__,
long_description=long_description,
long_description_content_type='text/x-rst',
author='Szilárd Pfeiffer',
author_email='[email protected]',
maintainer='Szilárd Pfeiffer',
maintainer_email='[email protected]',
license='MPL-2.0',
author=__setup__.__author__,
author_email=__setup__.__author_email__,
maintainer=__setup__.__author__,
maintainer_email=__setup__.__author_email__,
license=__setup__.__license__,
license_files=['LICENSE.txt', ],
project_urls={
'Homepage': 'https://gitlab.com/coroner/cryptodatahub',
'Changelog': 'https://cryptodatahub.readthedocs.io/en/latest/changelog',
'Documentation': 'https://cryptodatahub.readthedocs.io/en/latest/',
'Issues': 'https://gitlab.com/coroner/cryptodatahub/-/issues',
'Source': 'https://gitlab.com/coroner/cryptodatahub',
'Homepage': __setup__.__url__,
'Changelog': 'https://' + __setup__.__technical_name__ + '.readthedocs.io/en/latest/changelog',
'Documentation': 'https://' + __setup__.__technical_name__ + '.readthedocs.io/en/latest/',
'Issues': __setup__.__url__ + '/-/issues',
'Source': __setup__.__url__,
},
keywords='ssl tls ssh',

Expand All @@ -53,9 +51,9 @@ def test_discover():
"enum34==1.1.6",
"pathlib2==2.3.7.post1",
"Mock",
"unittest2",
],

"test": test_requirements,
"test": ["coverage", ],
"pep8": ["flake8", ],
"pylint": ["pylint", ],
},
Expand Down

0 comments on commit 5bc3f51

Please sign in to comment.