Migrate from setup.py to pyproject.toml

This commit is contained in:
Correl Roush 2020-10-15 22:45:17 -04:00
parent 078dd46faa
commit 1dec15bee9
5 changed files with 48 additions and 173 deletions

116
.gitignore vendored
View file

@ -1,111 +1,11 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.egg-info/
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
*.py[cod]
*~
.coverage
.eggs/
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
dist/
poetry.lock
reports/

View file

@ -3,19 +3,21 @@ python: 3.7
dist: xenial
sudo: true
before_install:
- pip install --upgrade pip
- pip install codecov
- pip install black
- pip install poetry
install:
- pip install -e .
- poetry install
script:
- python setup.py test
- poetry run py.test
after_success:
- codecov
before_deploy:
- pip install --upgrade pip
- poetry build
- poetry config http-basic.pypi $PYPI_USER $PYPI_PASS
deploy:
provider: pypi
user: correl
password:
secure: JwxQbfLuUW0wT6nYSSDBeRxLCkDJcyD5Jh5anfUJncGDM93O9fy+vSY2HhYTS3f8ZI42dQHicD+dG9TLiiU2I0BxiimEu2dRNxJGkkqeC7p97m4/+fPPXmLgaGyxFzqnU4vFNlDYtcd/jFQaQaT1PtaL2FVgJH0lEYoXGOa4T2MBDBqaJjbPtxFIUnEnpQsKDLBu2Pnj99z8zgTI5Ob7Rtt0RDT4lrt+A2bHHtIk3PAD6LKUebVFrQLr/XEOTDjzlkfqh3ZY3VH73OXWWXN41IJEYcEmnxDtWqT71VKD/bKPRsP2B/bIiB6fJSvmqkaoWenpizZglgW//WSQvt3nlAcZGGEHZ+0JsY/fKdTwF4ZPlPaOg+ssMt8OXkIGLk3wyPy0UUH6uMD6QkyPy/+9nRzqJv7UqQuyoqxwSmFpXvPQ07YErLakV+fGzKU4pqmRBQzAY+amj32ZNJuFKWuDMAU2xWilLnhtfdpxcwPDJxTetSCVMPr3nnYN9LWYckT9J14UfnN+OzgeLyoEpBuYe9DyB85wC2BIFizqRkxeDAmD/1cwh0Usjdb8gNzdIc8hUezarUkjEyUbgnnXMy1Zp0jrbMu8UVMIOpHpARVaz2BWTzpXEdef+NpDyQKs96kTooj7ezBnf7LU1Jam0haHhTZE4qkcGytjaL5qYLUYHRo=
distributions: sdist bdist_wheel
provider: script
script: poetry publish
on:
tags: true

View file

@ -1,13 +1,30 @@
[tool.black]
line-length = 88
py36 = true
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| build
| dist
)/
'''
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.poetry]
name = "typesafe-monads"
version = "0.8"
description = "Type-annotated monad implementations for Python 3.7+"
authors = ["Correl Roush <correl@gmail.com>"]
license = "MIT"
readme = "README.md"
packages = [
{ include = "monads" }
]
[tool.poetry.dependencies]
python = "^3.7"
tornado = "^6"
[tool.poetry.dev-dependencies]
black = { version = "*", allow-prereleases = true }
flake8 = "*"
mypy = "*"
pytest-asyncio = "*"
pytest-black = "*"
pytest-cov = "*"
pytest-mypy = "*"
[tool.pytest.ini_options]
addopts = "--black --mypy --cov monads --cov-report xml:reports/coverage.xml"

View file

@ -1,5 +0,0 @@
[aliases]
test=pytest
[tool:pytest]
addopts = --black --mypy --cov monads --cov-report xml:reports/coverage.xml

View file

@ -1,39 +0,0 @@
from setuptools import setup # type: ignore
with open("README.md", "r") as f:
long_description = f.read()
setup(
name="typesafe-monads",
version="0.8",
author="Correl Roush",
author_email="correl@gmail.com",
description="Type-annotated monad implementations for Python 3.7+",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/correl/typesafe-monads",
packages=["monads"],
package_data={"monads": ["py.typed"]},
include_package_data=True,
setup_requires=["pytest-runner"],
tests_require=[
"pytest",
"black",
"mypy",
"pytest-asyncio",
"pytest-cov",
"pytest-black",
"pytest-mypy",
],
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Libraries",
],
)