Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernizing setup #125

Merged
merged 7 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
- name: Install setuptools
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build setuptools twine

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python -m build
twine upload dist/*
67 changes: 67 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "traveltimepy"
dynamic = ["version"]
description = "Python Interface to Travel Time."
readme = { file = "README.md", content-type = "text/markdown" }
keywords = ["traveltimepy", "api", "maps"]
license = { text = "MIT" }
authors = [{ name = "TravelTime" }]
requires-python = ">=3.8"
dependencies = [
"pydantic",
"typing-extensions",
"geojson-pydantic>=1.0.1",
"shapely",
"dacite",
"certifi>=2021.5.30",
"aiohttp",
"aiolimiter",
"aiohttp-retry",
"protobuf==4.21.12",
"types-protobuf",
]
classifiers = [
"Programming Language :: Python :: 3",
"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",
"License :: OSI Approved :: MIT License",
]

[project.optional-dependencies]
test = [
"pytest",
"pytest-asyncio",
"flake8",
"flake8-pyproject",
"mypy",
"black",
]

[tool.setuptools]
zip-safe = false
include-package-data = true
packages = { find = {} }

[tool.setuptools.dynamic]
version = { attr = "traveltimepy.version.__version__" }

[tool.flake8]
per-file-ignores = ["**/__init__.py:F401"]
max-line-length = 88
extend-ignore = ["E203"] # See https://github.com/PyCQA/pycodestyle/issues/373
exclude = ["build/", "venv/", "traveltimepy/proto/"]

[tool.mypy]
ignore_missing_imports = true
exclude = "^(traveltimepy/proto/.*|build/.*|venv/.*)$"

[[tool.mypy.overrides]]
module = "traveltimepy.proto.*"
follow_imports = "skip"
55 changes: 0 additions & 55 deletions setup.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion traveltimepy/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.9.9"
__version__ = "3.9.10"
Loading