Skip to content
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
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# -- Project information -----------------------------------------------------

project = 'proxy-protocol'
copyright = '2023, Ian Good'
copyright = '2024, Ian Good'
author = 'Ian Good'

# The short X.Y version
Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM python:3.11-alpine
FROM python:3.12-alpine

WORKDIR /src
COPY . .

RUN pip install -U pip wheel setuptools typing-extensions
RUN pip install -U pip wheel setuptools hatch typing-extensions

RUN apk --update add --virtual build-dependencies python3-dev build-base \
&& pip install -r requirements-all.txt \
&& hatch env create docker \
&& apk del build-dependencies

ENTRYPOINT ["proxyprotocol-server"]
ENTRYPOINT ["hatch", "run", "docker:server"]
CMD ["--help"]
37 changes: 22 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Ian C. Good
# Copyright (c) 2024 Ian C. Good
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -51,6 +51,19 @@ dependencies = [

[project.optional-dependencies]
crc32c = ['crc32c ~= 2.2']
dev = [
'mypy',
'pytest',
'pytest-cov',
'ruff',
'pycodestyle',
'autopep8',
]
doc = [
'sphinx',
'sphinx-autodoc-typehints',
'cloud_sptheme',
]

[project.urls]
'Homepage' = 'https://github.com/icgood/proxy-protocol/'
Expand Down Expand Up @@ -109,15 +122,7 @@ exclude_lines = [
]

[tool.hatch.envs.default]
dependencies = [
'mypy',
'pytest',
'pytest-cov',
'ruff',
'pycodestyle',
'autopep8',
]
features = ['crc32c']
features = ['dev', 'crc32c']

[tool.hatch.envs.default.scripts]
run-pytest = 'py.test --cov-report=term-missing --cov=proxyprotocol'
Expand All @@ -130,12 +135,14 @@ check = ['run-pytest', 'run-autopep8', 'run-mypy', 'run-ruff']
python = ['3.8', '3.9', '3.10', '3.11', '3.12']

[tool.hatch.envs.doc]
dependencies = [
'sphinx',
'sphinx-autodoc-typehints',
'cloud_sptheme',
]
features = ['doc']

[tool.hatch.envs.doc.scripts]
build = 'make -C doc html'
browse = ['build', 'open doc/build/html/index.html']

[tool.hatch.envs.docker]
features = ['crc32c']

[tool.hatch.envs.docker.scripts]
server = 'proxyprotocol-server'
1 change: 0 additions & 1 deletion requirements-all.txt

This file was deleted.