forked from dephell/dephell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
191 lines (166 loc) · 5.39 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Default section.
# Convert dephell metainfo and dependencies from poetry to setup.py:
# $ dephell deps convert
[tool.dephell.main]
# read from poetry format
from = {format = "poetry", path = "pyproject.toml"}
# and convert into setup.py
to = {format = "setuppy", path = "setup.py"}
# explicitly specify your versioning scheme to let your users know what they can expect
versioning = "semver"
# Make lockfile
# $ dephell deps convert --env=lock
[tool.dephell.lock]
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "poetrylock", path = "poetry.lock"}
# Install flake8 with plugin in the separated venv and run it:
# $ dephell venv create --env=flake8
# $ dephell deps install --env=flake8
# $ dephell venv run --env=flake8
[tool.dephell.flake8]
# read requirements file
from = {format = "pip", path = "requirements-flake.txt"}
# run this command
command = "flake8"
[tool.dephell.typing]
from = {format = "poetry", path = "pyproject.toml"}
# mypy isn't specified in dependencies,
# but `dephell venv run` command will install it automatically
command = "mypy --ignore-missing-imports --allow-redefinition dephell"
# Test project package in the separated venv:
# $ dephell project test --env=pytest
[tool.dephell.pytest]
# read dependencies from poetry format
from = {format = "poetry", path = "pyproject.toml"}
# install dependencies from `dependencies` section and `tests` extra
envs = ["main", "tests"]
# copy files that requred for tests
tests = ["tests", "README.md"]
# run command `pytest`
command = "python -m pytest tests/"
[tool.dephell.pypy]
from = {format = "poetry", path = "pyproject.toml"}
# force python interpreter for env
python = "pypy3"
command = "pytest -x tests/"
# Install `docs` extra dependencies in the separated venv and run sphinx:
# $ dephell venv create --env=docs
# $ dephell deps install --env=docs
# $ dephell venv run --env=docs
[tool.dephell.docs]
# read dependencies from poetry format
from = {format = "poetry", path = "pyproject.toml"}
# install only `docs` extra dependencies
envs = ["docs"]
# run this command:
command = "sphinx-build -W docs docs/build"
# Sort imports in the project:
[tool.dephell.isort]
from = {format = "poetry", path = "pyproject.toml"}
envs = ["main", "dev"]
command = "isort -y"
[tool.dephell.vendorized]
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "wheel", path = "dist-vendored/"}
envs = ["main"]
# Make vendorized version of the project:
# dephell vendor download --env=vendorized
# dephell vendor import --env=vendorized
[tool.dephell.vendorized.vendor]
path = "dephell_vendor"
exclude = ["jinja2", "test", "setuptools", "pip"]
# -- ISORT -- #
[tool.isort]
skip = "tests/requirements"
line_length = 120
combine_as_imports = true
balanced_wrapping = true
lines_after_imports = 2
not_skip = "__init__.py"
multi_line_output = 5
import_heading_stdlib = "built-in"
import_heading_thirdparty = "external"
import_heading_firstparty = "project"
import_heading_localfolder = "app"
# -- POETRY -- #
[tool.poetry]
name = "dephell"
version = "0.7.6"
authors = ["Gram <[email protected]>"]
description = "Dependency resolution for Python"
readme = "README.md"
license = "MIT"
repository = "https://github.com/dephell/dephell"
documentation = "https://dephell.readthedocs.io/ "
keywords = [
"dephell", "packaging", "dependency", "dependencies", "venv", "licenses",
"pip", "poetry", "pipfile", "pipenv", "setuptools",
]
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Framework :: Setuptools Plugin",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Security", # because we lock dependencies with hashes :)
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[tool.poetry.scripts]
dephell = "dephell.cli:entrypoint"
[tool.poetry.dependencies]
python = ">=3.5"
aiohttp = "*"
appdirs = "*"
attrs = "*"
bowler = {python = ">=3.6",version = "*"}
bowler-py35 = {version = ">=0.9.1",python = "<3.6"}
cerberus = ">=1.3"
docker = "*"
dockerpty = "*"
fissix = {python = ">=3.6",allows-prereleases = true,version = "*"}
fissix-py35 = {python = "<3.6",version = "*"}
html5lib = "*"
jinja2 = "*"
m2r = "*"
packaging = "*"
pip = ">=18.0"
pyyaml = "*" # TODO: replace by ruamel.yaml when migrate from poetry format to flit
requests = "*"
setuptools = "*"
tomlkit = "*"
yaspin = "*"
# optional
aiofiles = {optional = true,version = "*"}
autopep8 = {optional = true,version = "*"}
colorama = {optional = true,version = "*"}
graphviz = {optional = true,version = "*"}
yapf = {optional = true,version = "*"}
# dephell ecosystem
dephell-archive = ">=0.1.5"
dephell-discover = ">=0.2.6"
dephell-licenses = ">=0.1.6"
dephell-links = ">=0.1.4"
dephell-markers = ">=1.0.0"
dephell-pythons = ">=0.1.11"
dephell-shells = ">=0.1.3"
dephell-specifier = ">=0.1.7"
dephell-venvs = ">=0.1.16"
dephell-versioning = "*"
[tool.poetry.dev-dependencies]
pytest = "*"
requests-mock = "*"
aioresponses = "*"
sphinx = "*"
recommonmark = "*"
sphinx-rtd-theme = "*"
pygments-github-lexers = "*"
flake8-isort = "*"
isort = {extras = ["pyproject"],version = "*"}
# pre-commit = "*"
[tool.poetry.extras]
full = ["aiofiles", "autopep8", "colorama", "graphviz", "yapf"]
tests = ["aioresponses", "pytest", "requests-mock"]
docs = ["pygments-github-lexers", "recommonmark", "sphinx", "sphinx-rtd-theme"]