Skip to content

Commit

Permalink
Add setup files
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Oct 29, 2023
1 parent 79e1f9c commit 754e051
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 0 deletions.
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
flake8==4.0.1
mypy==0.971
mypy-extensions==0.4.3
typing-extensions>=4.2.0
46 changes: 46 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[flake8]
count = True
ignore = W503
max-line-length = 120
exclude = stubs/*
show-source = True
statistics = True


[mypy]
mypy_path = ./stubs/

python_version = 3.10

ignore_missing_imports = False

disallow_any_generics = True

disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True

no_implicit_optional = True
strict_optional = True

warn_redundant_casts = True
warn_unused_ignores = True
warn_no_return = True
warn_return_any = True
warn_unreachable = True

ignore_errors = False

allow_untyped_globals = False
allow_redefinition = False
implicit_reexport = False
strict_equality = True

show_error_context = False
show_column_numbers = True
show_error_codes = True
color_output = True
error_summary = True
pretty = True

50 changes: 50 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env python3

from pathlib import Path
from typing import cast

import setuptools

package_name = 'stgpytools'

exec(Path(f'{package_name}/_metadata.py').read_text(), meta := cast(dict[str, str], {}))

readme = Path('README.md').read_text()

setuptools.setup(
name=package_name,
version=meta['__version__'],
author=meta['__author_name__'],
author_email=meta['__author_email__'],
maintainer=meta['__maintainer_name__'],
maintainer_email=meta['__maintainer_email__'],
description=meta['__doc__'],
long_description=readme,
long_description_content_type='text/markdown',
project_urls={
'Source Code': 'https://github.com/Setsugennoao/stgpytools',
},
python_requires='>=3.11',
packages=[
package_name,
f'{package_name}.enums',
f'{package_name}.exceptions',
f'{package_name}.functions',
f'{package_name}.types',
f'{package_name}.utils'
],
package_data={
package_name: ['py.typed', 'utils/*.json']
},
classifiers=[
"Natural Language :: English",

"Intended Audience :: Developers",
"Intended Audience :: Other Audience",

"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Typing :: Typed",
]
)
12 changes: 12 additions & 0 deletions stgpytools/_metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Collection of stuff that's useful in general python programming"""

__version__ = '0.0.0'

__author__ = 'Setsugen no ao <[email protected]>'
__maintainer__ = __author__

__author_name__, __author_email__ = [x[:-1] for x in __author__.split('<')]
__maintainer_name__, __maintainer_email__ = [x[:-1] for x in __maintainer__.split('<')]

if __name__ == '__github__':
print(__version__)

0 comments on commit 754e051

Please sign in to comment.