-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (138 loc) · 4.49 KB
/
pyproject.toml
File metadata and controls
153 lines (138 loc) · 4.49 KB
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
[build-system]
requires = [
"setuptools>=68.0,<75.4.0",
"wheel",
"Cython>=3.0",
"tomli>=2.0.0; python_version < '3.11'"
]
build-backend = "setuptools.build_meta"
[project]
name = "httpmorph"
version = "0.2.8"
description = "A Python HTTP client focused on mimicking browser fingerprints."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{name = "Arman Hossain", email = "arman@bytetunnels.com"}
]
keywords = ["http", "https", "client", "performance", "anti-fingerprint", "tls", "ja3", "http2"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"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",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: C",
"Operating System :: OS Independent",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = []
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-asyncio>=0.21.0",
"pytest-benchmark>=4.0",
"pytest-cov>=4.0",
"cryptography>=41.0", # For test HTTPS server
"filelock>=3.12.0", # For test fixtures
"mypy>=1.0",
"ruff>=0.7.0",
]
build = [
"setuptools>=68.0",
"wheel",
"Cython>=3.0",
]
[project.urls]
Homepage = "https://github.com/arman-bd/httpmorph"
Documentation = "https://github.com/arman-bd/httpmorph/blob/main/README.md"
Repository = "https://github.com/arman-bd/httpmorph"
Issues = "https://github.com/arman-bd/httpmorph/issues"
[tool.setuptools]
packages = ["httpmorph"]
package-dir = {"" = "src"}
# Don't automatically include LICENSE file (causes PyPI upload issues)
license-files = []
[tool.setuptools.package-data]
httpmorph = ["*.pyx", "*.pxd", "*.c", "*.h"]
[tool.ruff]
line-length = 100
target-version = "py38"
fix = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function calls in argument defaults
"C901", # too complex
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --strict-markers"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"benchmark: marks tests as benchmarks",
"fingerprint: marks tests that check fingerprinting",
"integration: marks tests that require network access",
"ssl: marks tests that require SSL support",
]
[tool.cibuildwheel]
build = "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
skip = "*-musllinux_* *-win32 *-win_arm64"
build-verbosity = 1
[tool.cibuildwheel.linux]
# Enable both x86_64 and aarch64 (ARM64) builds
archs = ["x86_64", "aarch64"]
before-all = [
"sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* || true",
"sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* || true",
"yum install -y cmake openssl-devel zlib-devel brotli-devel pkgconfig autoconf automake libtool golang || yum install -y openssl-devel zlib-devel brotli-devel pkgconfig autoconf automake libtool golang",
]
before-build = "bash scripts/setup_vendors.sh"
[tool.cibuildwheel.macos]
before-all = [
"brew install cmake ninja go",
]
before-build = "bash scripts/setup_vendors.sh"
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel} --ignore-missing-dependencies"
[tool.cibuildwheel.windows]
before-all = [
"choco install cmake ninja golang -y",
"vcpkg install brotli:x64-windows --clean-after-build || echo 'vcpkg brotli install skipped'",
]
before-build = [
"bash scripts/setup_vendors.sh",
]
environment = { VCPKG_ROOT = "C:/vcpkg" }