Skip to content

Commit

Permalink
Migrated packaging metadata to pyproject.toml and added the py.typed …
Browse files Browse the repository at this point in the history
…marker
  • Loading branch information
agronholm committed Oct 9, 2023
1 parent bfb32da commit 51dabd9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 55 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include *.py
include *.rst
include *.txt
include tzlocal/py.typed
recursive-include tests/test_data *
include tests/*.py
exclude Makefile
49 changes: 48 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
[build-system]
requires = ["setuptools >= 42", "wheel"]
requires = ["setuptools >= 64"]
build-backend = "setuptools.build_meta"

[project]
name = "tzlocal"
description = "tzinfo object for the local timezone"
readme = "README.rst"
version = "5.2.dev0"
authors = [{name = "Lennart Regebro", email = "[email protected]"}]
license = {text = "MIT"}
keywords = ["timezone"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Typing :: Typed",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">= 3.8"
dependencies = [
"backports.zoneinfo; python_version < '3.9'",
"tzdata; platform_system == 'Windows'",
]

[project.urls]
"Source code" = "https://github.com/regebro/tzlocal"
Changelog = "https://github.com/regebro/tzlocal/blob/master/CHANGES.txt"
"Issue tracker" = "https://github.com/regebro/tzlocal/issues"

[project.optional-dependencies]
devenv = [
"pytest >= 4.3",
"pytest-mock >= 3.3",
"pytest-cov",
"black",
"flake8",
"check_manifest",
"pyroma",
"zest.releaser",
]

[tool.zest.releaser]
create-wheel = true

[tool.pytest.ini_options]
testpaths = "tests"
51 changes: 0 additions & 51 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
[metadata]
name = tzlocal
description = tzinfo object for the local timezone
long_description = file: README.rst, CHANGES.txt
version = 5.2.dev0
author = Lennart Regebro
author_email = [email protected]
project_urls =
Source code = https://github.com/regebro/tzlocal
Issue tracker = https://github.com/regebro/tzlocal/issues
license = MIT
keywords = timezone
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Operating System :: Microsoft :: Windows
Operating System :: Unix
Operating System :: MacOS :: MacOS X
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
packages = find:
python_requires = >= 3.8
zip_safe = True
install_requires =
backports.zoneinfo; python_version < "3.9"
tzdata; platform_system == "Windows"

[options.packages.find]
include = tzlocal

[options.extras_require]
devenv =
pytest >= 4.3
pytest-mock >= 3.3
pytest-cov
black
flake8
check_manifest
pyroma
zest.releaser

[zest.releaser]
create-wheel = yes

[flake8]
max-line-length=120
# black and flake8 differs in opinion here, and I can't change black:
Expand Down
3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

Empty file added tzlocal/py.typed
Empty file.

0 comments on commit 51dabd9

Please sign in to comment.