Skip to content

Commit

Permalink
Add setup config.
Browse files Browse the repository at this point in the history
  • Loading branch information
VicGrygorchyk committed Nov 6, 2019
1 parent 4c581e2 commit ac38e69
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
selenium==3.141.0
urllib3==1.25.3
mypy==0.740
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[pycodestyle]
ignore=E501
max_line_length=110

[mypy]
python_version = 3.6
show_column_numbers = True
; Suppress error messages about imports that cannot be resolved (PEP-561 non-complient packages):
ignore_missing_imports = True
; Report an error whenever it encounters a function definition without type annotations:
disallow_untyped_defs = True
; Disallow calling functions without type annotations in the scope of annotated functions:
disallow_untyped_calls = True
; Require from arguments with a None default value to be explicitly Optional:
no_implicit_optional = True
; Report an err whenever code uses a # type: ignore comment on a line that is not actually generating an error message:
warn_unused_ignores = True
; In order to avoid bugs and confusion don't use mypy cache:
incremental = False
31 changes: 24 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
import setuptools
from setuptools import setup, find_packages


def get_requirements():
"""Reads the installation requirements from requirements.pip"""
with open("requirements.pip") as reqfile:
return [line for line in reqfile.read().split("\n") if not line.startswith(('#', '-'))]


def get_test_requirements():
"""Reads the installation requirements for tests"""
with open("test-requirements.pip") as test_reqfile:
return [line for line in test_reqfile.read().split("\n") if not line.startswith(('#', '-'))]


with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(

setup(
name="selen-kaa",
version="0.0.1",
author="Example Author",
author_email="author@example.com",
description="A small example package",
author="Viktor Grygorchuk",
author_email="vvgrygorchuk@gmail.com",
description="A lightweight wrapper around Selenium python repo.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pypa/sampleproject",
packages=setuptools.find_packages(),
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=get_requirements(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Operating System :: OS Independent"
],
test_suite="tests",
tests_require=get_test_requirements()
)

0 comments on commit ac38e69

Please sign in to comment.