-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '88-switch-from-setup-py-to-pyproject-toml'
Closes: #88
- Loading branch information
Showing
15 changed files
with
142 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,10 @@ | |
|
||
*.pyc | ||
|
||
.coverage | ||
.idea | ||
.mypy_cache | ||
*.egg-info | ||
|
||
/.coverage | ||
|
||
/*.egg-info | ||
/.eggs | ||
/.tox | ||
/Pipfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
[BASIC] | ||
[MAIN] | ||
|
||
good-names = e,f,g,n,p,q,y,_,H2 | ||
|
||
class-attribute-rgx = ([A-Za-z_][A-Za-z0-9_]{2,50}|(__.*__))$ | ||
method-rgx = [a-z_][a-z0-9_]{2,50}$ | ||
variable-rgx = [a-z_][a-z0-9_]{2,50}$ | ||
jobs=0 | ||
|
||
[MASTER] | ||
|
||
load-plugins = pylint.extensions.no_self_use | ||
|
||
[FORMAT] | ||
|
||
max-line-length = 120 | ||
max-line-length=120 | ||
|
||
[MESSAGES CONTROL] | ||
|
||
disable = missing-docstring,too-few-public-methods,too-many-ancestors,duplicate-code | ||
disable= | ||
missing-docstring, | ||
too-few-public-methods, | ||
too-many-function-args, | ||
too-many-ancestors, | ||
duplicate-code, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
include *.rst | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
__title__ = 'CryptoParser' | ||
import importlib.metadata | ||
|
||
metadata = importlib.metadata.metadata('cryptoparser') | ||
|
||
__title__ = metadata['Name'] | ||
__technical_name__ = __title__.lower() | ||
__version__ = '0.12.6' | ||
__description__ = 'An analysis oriented security protocol parser and generator' | ||
__author__ = 'Szilárd Pfeiffer' | ||
__author_email__ = 'coroner@pfeifferszilard.hu' | ||
__version__ = metadata['Version'] | ||
__description__ = metadata['Summary'] | ||
__author__ = metadata['Author'] | ||
__author_email__ = metadata['Author-email'] | ||
__url__ = 'https://gitlab.com/coroner/' + __technical_name__ | ||
__license__ = 'MPL-2.0' | ||
__license__ = metadata['License'] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
[build-system] | ||
requires = ['setuptools', 'setuptools-scm'] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
[project] | ||
name = 'CryptoParser' | ||
version = '0.12.6' | ||
description = 'An analysis oriented security protocol parser and generator' | ||
authors = [ | ||
{name = 'Szilárd Pfeiffer', email = 'coroner@pfeifferszilard.hu'} | ||
] | ||
maintainers = [ | ||
{name = 'Szilárd Pfeiffer', email = 'coroner@pfeifferszilard.hu'} | ||
] | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Environment :: Console', | ||
'Framework :: tox', | ||
'Intended Audience :: Information Technology', | ||
'Intended Audience :: Science/Research', | ||
'Intended Audience :: System Administrators', | ||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', | ||
'Natural Language :: English', | ||
'Operating System :: MacOS', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: POSIX', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Programming Language :: Python :: 3.13', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
'Programming Language :: Python', | ||
'Topic :: Internet', | ||
'Topic :: Security', | ||
'Topic :: Security :: Cryptography', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Software Development :: Testing :: Traffic Generation', | ||
'Topic :: Software Development :: Testing', | ||
] | ||
|
||
keywords=['ssl', 'tls', 'gost', 'ja3', 'ldap', 'rdp', 'ssh', 'hsts', 'dns'] | ||
readme = {file = 'README.rst', content-type = 'text/x-rst'} | ||
license = {text = 'MPL-2.0'} | ||
|
||
dependencies = [ | ||
'asn1crypto', | ||
'attrs', | ||
'cryptodatahub==0.12.6', | ||
'python-dateutil', | ||
'urllib3', | ||
] | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
'pyfakefs', | ||
] | ||
docs = [ | ||
'sphinx', | ||
'sphinx-sitemap', | ||
] | ||
|
||
[project.urls] | ||
Homepage = 'https://gitlab.com/coroner/cryptoparser' | ||
Changelog = 'https://cryptoparser.readthedocs.io/en/latest/changelog' | ||
Documentation = 'https://cryptoparser.readthedocs.io/en/latest/' | ||
Issues = 'https://gitlab.com/coroner/cryptoparser/-/issues' | ||
Source = 'https://gitlab.com/coroner/cryptoparser' | ||
|
||
[tool.variables] | ||
technical_name = 'cryptoparser' | ||
|
||
[tool.setuptools] | ||
license-files = ['LICENSE.txt'] | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ['submodules'] | ||
|
||
[tool.tox] | ||
envlist = [ | ||
'pep8', | ||
'pylint', | ||
'pypy3', | ||
'py39', | ||
'py310', | ||
'py311', | ||
'py312', | ||
'py313', | ||
'pythonrc', | ||
] | ||
|
||
[tool.tox.env_run_base] | ||
deps = ['coverage', '.[tests]'] | ||
commands = [ | ||
['coverage', 'erase'], | ||
['coverage', 'run', '-m', 'unittest', 'discover', '-v'], | ||
['coverage', 'report'] | ||
] | ||
|
||
[tool.tox.env.pep8] | ||
deps = ['flake8'] | ||
commands = [['flake8', 'cryptoparser', 'docs', 'test']] | ||
|
||
[tool.tox.env.pylint] | ||
deps = ['pylint', '.[tests]'] | ||
commands = [['pylint', '--rcfile', '.pylintrc', 'cryptoparser', 'docs', 'test']] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,5 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import codecs | ||
import os | ||
import unittest | ||
import setuptools | ||
|
||
from setuptools import setup | ||
|
||
from cryptoparser import __setup__ | ||
|
||
|
||
this_directory = os.getenv('REQUIREMENTS_DIR', '') | ||
with open(os.path.join(this_directory, 'requirements.txt')) as f: | ||
install_requirements = f.read().splitlines() | ||
this_directory = os.path.abspath(os.path.dirname(__file__)) | ||
with codecs.open(os.path.join(this_directory, 'README.rst'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
def test_discover(): | ||
test_loader = unittest.TestLoader() | ||
test_suite = test_loader.discover('test', pattern='test_*.py') | ||
return test_suite | ||
|
||
|
||
setup( | ||
name=__setup__.__title__, | ||
version=__setup__.__version__, | ||
description=__setup__.__description__, | ||
long_description=long_description, | ||
long_description_content_type='text/x-rst', | ||
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': __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 gost ja3 ldap rdp ssh hsts dns', | ||
|
||
install_requires=install_requirements, | ||
extras_require={ | ||
"test": ["coverage", ], | ||
"pep8": ["flake8", ], | ||
"pylint": ["pylint", ], | ||
}, | ||
|
||
packages=[ | ||
'cryptoparser', | ||
'cryptoparser.common', | ||
'cryptoparser.dnsrec', | ||
'cryptoparser.httpx', | ||
'cryptoparser.ssh', | ||
'cryptoparser.tls', | ||
], | ||
|
||
test_suite='setup.test_discover', | ||
|
||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Environment :: Console', | ||
'Framework :: tox', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Information Technology', | ||
'Intended Audience :: Science/Research', | ||
'Intended Audience :: System Administrators', | ||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', | ||
'Natural Language :: English', | ||
'Operating System :: MacOS', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: POSIX', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Programming Language :: Python :: 3.13', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
'Programming Language :: Python', | ||
'Topic :: Internet', | ||
'Topic :: Security', | ||
'Topic :: Security :: Cryptography', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Software Development :: Testing :: Traffic Generation', | ||
'Topic :: Software Development :: Testing', | ||
], | ||
) | ||
setuptools.setup() |
Submodule cryptodatahub
updated
from 5fe37d to 075ef4