summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
blob: a61cae0cac21c79a91368adc0b74992d22bce5eb (plain)
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
[tool.poetry]
name = "pendulum"
version = "3.0.0a1"
description = "Python datetimes made easy"
authors = ["Sébastien Eustace <sebastien@eustace.io>"]
license = "MIT"
readme = 'README.rst'
homepage = "https://pendulum.eustace.io"
repository = "https://github.com/sdispater/pendulum"
documentation = "https://pendulum.eustace.io/docs"
keywords = ['datetime', 'date', 'time']

packages = [
    { include = "pendulum" },
    { include = "tests", format = "sdist" },
]
include = [
    { path = "meson.build", format = "sdist" },
    { path = "pendulum/py.typed" },
    # C extensions must be included in the wheel distributions
    { path = "pendulum/_extensions/*.so", format = "wheel" },
    { path = "pendulum/_extensions/*.pyd", format = "wheel" },
    { path = "pendulum/parsing/*.so", format = "wheel" },
    { path = "pendulum/parsing/*.pyd", format = "wheel" },
]


[tool.poetry.dependencies]
python = "^3.7"
python-dateutil = "^2.6"
"backports.zoneinfo" = { version = "^0.2.1", python = ">=3.7,<3.9" }
time-machine = { version = "^2.6.0", markers = "implementation_name != 'pypy'" }
tzdata = ">=2020.1"
importlib-resources = { version = "^5.9.0", python = ">=3.7,<3.9" }

[tool.poetry.group.test.dependencies]
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
pytz = ">=2022.1"
time-machine = "^2.7.1"

[tool.poetry.group.doc.dependencies]
mkdocs = "^1.0"
pymdown-extensions = "^6.0"
pygments = "^2.2"
markdown-include = "^0.5.1"

[tool.poetry.group.lint.dependencies]
black = { version = "^22.6.0", markers = "implementation_name != 'pypy'" }
isort = "^5.10.1"
pre-commit = "^2.20.0"
types-backports = "^0.1.3"
types-python-dateutil = "^2.8.19"

[tool.poetry.group.dev.dependencies]
babel = "^2.10.3"
cleo = "^1.0.0a5"
tox = "^3.25.1"

[tool.poetry.group.build]
optional = true

[tool.poetry.group.build.dependencies]
meson = "^0.63.2"
ninja = "^1.10.2.3"

[tool.poetry.build]
generate-setup-file = false
script = "build.py"

[tool.isort]
profile = "black"
force_single_line = true
atomic = true
lines_after_imports = -1
lines_between_types = 1
skip_glob = [
    "pendulum/locales/**",
    "build.py",
    "pendulum/__version__.py",
]
filter_files = true
known_first_party = "pendulum"
known_third_party = [
    "babel",
    "cleo",
    "dateutil",
    "time_machine",
    "pytzdata",
]

[tool.mypy]
strict = true
files = "pendulum, tests"
show_error_codes = true
pretty = true

# The following whitelist is used to allow for incremental adoption
# of Mypy. Modules should be removed from this whitelist as and when
# their respective type errors have been addressed. No new modules
# should be added to this whitelist.

[[tool.mypy.overrides]]
module = [
    "pendulum.mixins.default",
    "tests.conftest",
    "tests.test_helpers",
    "tests.test_main",
    "tests.test_parsing",
    "tests.date.test_add",
    "tests.date.test_behavior",
    "tests.date.test_construct",
    "tests.date.test_comparison",
    "tests.date.test_day_of_week_modifiers",
    "tests.date.test_diff",
    "tests.date.test_fluent_setters",
    "tests.date.test_getters",
    "tests.date.test_start_end_of",
    "tests.date.test_strings",
    "tests.date.test_sub",
    "tests.datetime.test_add",
    "tests.datetime.test_behavior",
    "tests.datetime.test_construct",
    "tests.datetime.test_comparison",
    "tests.datetime.test_create_from_timestamp",
    "tests.datetime.test_day_of_week_modifiers",
    "tests.datetime.test_diff",
    "tests.datetime.test_fluent_setters",
    "tests.datetime.test_from_format",
    "tests.datetime.test_getters",
    "tests.datetime.test_naive",
    "tests.datetime.test_replace",
    "tests.datetime.test_start_end_of",
    "tests.datetime.test_strings",
    "tests.datetime.test_sub",
    "tests.datetime.test_timezone",
    "tests.duration.test_add_sub",
    "tests.duration.test_arithmetic",
    "tests.duration.test_behavior",
    "tests.duration.test_construct",
    "tests.duration.test_in_methods",
    "tests.duration.test_in_words",
    "tests.duration.test_total_methods",
    "tests.formatting.test_formatter",
    "tests.helpers.test_local_time",
    "tests.localization.*",
    "tests.parsing.test_parsing",
    "tests.parsing.test_parsing_duration",
    "tests.parsing.test_parse_iso8601",
    "tests.interval.test_add_subtract",
    "tests.interval.test_arithmetic",
    "tests.interval.test_behavior",
    "tests.interval.test_construct",
    "tests.interval.test_hashing",
    "tests.interval.test_in_words",
    "tests.interval.test_range",
    "tests.time.test_add",
    "tests.time.test_behavior",
    "tests.time.test_comparison",
    "tests.time.test_construct",
    "tests.time.test_diff",
    "tests.time.test_fluent_setters",
    "tests.time.test_strings",
    "tests.time.test_sub",
    "tests.tz.test_helpers",
    "tests.tz.test_local_timezone",
    "tests.tz.test_timezone",
    "tests.tz.test_timezones",
]
ignore_errors = true

[tool.coverage.run]
omit = [
    "pendulum/locales/*",
    "pendulum/__version__.py,",
    "pendulum/_extensions/*",
    "pendulum/parsing/iso8601.py",
    "pendulum/utils/_compat.py",
]

[build-system]
requires = ["poetry-core>=1.1.0a6", "meson", "ninja"]
build-backend = "poetry.core.masonry.api"