Skip to content

Commit

Permalink
Merge pull request #1321 from pimutils/chore/pyproject.toml
Browse files Browse the repository at this point in the history
move from setup.py to pyproject.toml
  • Loading branch information
geier authored Nov 15, 2023
2 parents 92f5b88 + e386a3a commit a278c6e
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 83 deletions.
5 changes: 3 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ build:

python:
install:
- requirements: doc/requirements.txt
- method: setuptools
- method: pip
path: .
extra_requirements:
- docs

# This is the default, you can omit this
formats: []
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ may want to subscribe to `GitHub's tag feed
======
not released yet

* UPDATED REQUIREMENT urwid is now required >= 2.1.0
* optimization in ikhal when editing events in the far future or past
* FIX an issue in ikhal with updating the view of the event list after editing
an event
Expand Down
3 changes: 0 additions & 3 deletions doc/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions khal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def get_wrapped_text(widget: urwid.AttrMap) -> str:
def human_formatter(format_string, width=None, colors=True):
"""Create a formatter that formats events to be human readable."""
def fmt(rows):
single = type(rows) == dict
single = isinstance(rows, dict)
if single:
rows = [rows]
results = []
Expand Down Expand Up @@ -233,7 +233,7 @@ def json_formatter(fields):
fields = CONTENT_ATTRIBUTES

def fmt(rows):
single = type(rows) == dict
single = isinstance(rows, dict)
if single:
rows = [rows]

Expand Down
71 changes: 71 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
[project]
name = "khal"
dynamic = ["version"]
description = "Standards based terminal calendar"
readme = "README.rst"
authors = [
{name = "khal contributors", email = "khal@lostpackets.de"},
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console :: Curses",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"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",
"Topic :: Communications",
"Topic :: Utilities",
]
dependencies = [
"click>=3.2",
"click_log>=0.2.0",
"icalendar>=4.0.3",
"urwid>=2.1.0",
"pyxdg",
"pytz",
"python-dateutil",
"configobj",
"atomicwrites>=0.1.7",
"tzlocal>=1.0",
]
[project.optional-dependencies]
proctitle = [
"setproctitle"
]
test = [
"freezegun",
"hypothesis",
"packaging",
"vdirsyncer",
]
docs = [
"sphinx!=1.6.1",
"sphinxcontrib-newsfeed",
"sphinx-rtd-theme",
]

[project.urls]
homepage = "http://lostpackets.de/khal/"
repository = "https://github.com/pimutils/khal"

[project.scripts]
khal = "khal.cli:main_khal"
ikhal = "khal.cli:main_ikhal"

[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
requires-python = ">=3.8,<3.12"

[tool.setuptools.packages]
find = {}

[tool.setuptools_scm]
version_file = "khal/version.py"

[tool.ruff]
select = ["E", "F", "W", "I", "B0", "UP", "C4"]
ignore = ["B008"]
Expand Down
76 changes: 0 additions & 76 deletions setup.py

This file was deleted.

0 comments on commit a278c6e

Please sign in to comment.