Skip to content

Commit e15802e

Browse files
authored
Release 0.2.1 (#21)
* [BUGFIX] Fix Broken Release (#19) * fix: resolve Linux and macOS build failures, add CI build tests Build Fixes: - Add pthread.h include for Linux builds (network.c) Fixes missing PTHREAD_MUTEX_INITIALIZER and pthread function declarations - Remove duplicate _POSIX_C_SOURCE definition (http2_session_manager.c) Fixes redefinition warning and implicit usleep declaration The macro is already defined in internal.h with a newer POSIX standard - Fix -march=native flag for macOS ARM64 builds (setup.py) Refactored architecture detection to skip unsupported flags on ARM64 macOS * x86_64/AMD64: Use -march=native * ARM64 on Linux: Use -mcpu=native * ARM64 on macOS: Skip architecture flags (clang doesn't support them) CI Improvements: - Add build test jobs for Linux, macOS, and Windows to CI pipeline - Build and test all Python versions (3.8-3.14) on every push/PR - Align CI build workflow with release pipeline for consistency - Add build status reporting in CI summary These changes ensure builds succeed on all platforms and catch build failures early in the development process. * fix: skip C extension build on Read the Docs Read the Docs doesn't need C extensions to build documentation. Detect READTHEDOCS environment variable and skip Cython/C compilation when building on RTD infrastructure. This allows documentation builds to succeed without requiring vendor dependencies (nghttp2, BoringSSL) to be available. * chore: Fixed indentation in setup.py: - All Extension() constructor parameters are now properly indented - The build will now work correctly on Linux/macOS/Windows - Read the Docs will skip C extensions entirely (no compilation needed for docs) * fix: resolve Linux/macOS build failures and add CI build tests for all platforms * fix: Resolve Linux and macOS build failures - Add OpenSSL 1.0.x compatibility for old manylinux containers - Add TLS 1.3 guards for OpenSSL versions without TLS 1.3 support - Force static library linking on macOS to avoid Homebrew dylib version mismatches - Prioritize vendor-built libraries over system libraries on macOS * fix: Resolve Linux sign-compare warnings and macOS library linking issues - Fix sign-compare warnings in tls.c by using int instead of size_t for browser profile counts - Force static library linking on macOS to avoid Homebrew dylib version conflicts - Prioritize vendor-built libraries over system libraries on both Linux and macOS * fix: Resolve Python 3.8 setuptools compatibility and build issues - Constrain setuptools <75.4.0 for Python 3.8 (dropped support in 75.4.0) * fix: Resolve build and runtime failures across all platforms - Constrain setuptools <75.4.0 for Python 3.8 (dropped in 75.4.0) - Remove -march=native flags to fix "Illegal instruction" on Linux - Fix sign-compare warnings in tls.c (use int for profile counts) - Force static library linking on macOS to avoid Homebrew conflicts - Ensure portable wheels that work across different CPUs * fix: Resolve build failures across all platforms - Cap setuptools <75.4.0 for Python 3.8 compatibility - Remove -march=native to create portable wheels - Fix sign-compare warnings in tls.c - Force static library linking on macOS - Ensure wheels work across different CPUs and Python versions * fix: Add OpenSSL 1.0.x compatibility for manylinux builds - Add compatibility wrappers for OpenSSL 1.1.0+ APIs - Map TLS_client_method to SSLv23_client_method for 1.0.x - Add fallback for SSL_CTX_set_min/max_proto_version - Skip X25519 curve when not available in OpenSSL 1.0.x - Remove duplicate POSIX feature test macros - Ensure all builds work with OpenSSL 1.0.x (manylinux) and 1.1.0+ * fix: Add comprehensive OpenSSL 1.0.x and POSIX compatibility * fix: Fixed io_uring detection, added liburing static library support, and properly linked BoringSSL with C++ runtime support * [CHORE] Attribution and Version Bump to 0.2.1 (#20)
1 parent b914125 commit e15802e

File tree

14 files changed

+615
-322
lines changed

14 files changed

+615
-322
lines changed

.github/workflows/_build_linux.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ name: Build Linux Wheels
22

33
on:
44
workflow_call:
5-
inputs:
6-
python-versions:
7-
description: 'Python versions to build for'
8-
required: false
9-
type: string
10-
default: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]'
115

126
jobs:
137
build-linux:
@@ -42,7 +36,7 @@ jobs:
4236
- name: Build wheels
4337
uses: pypa/cibuildwheel@v2.22.0
4438
env:
45-
# Build for specified Python versions
39+
# Build for all Python versions
4640
CIBW_BUILD: cp38-manylinux_x86_64 cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp314-manylinux_x86_64
4741
# Vendor build happens inside manylinux container via before-build (from pyproject.toml)
4842
# The script will detect cached libraries and skip rebuilding

.github/workflows/_build_macos.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ name: Build macOS Wheels
22

33
on:
44
workflow_call:
5-
inputs:
6-
python-versions:
7-
description: 'Python versions to build for'
8-
required: false
9-
type: string
10-
default: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]'
115

126
jobs:
137
build-macos:
@@ -84,7 +78,7 @@ jobs:
8478
env:
8579
# Skip before-build since we already built vendors
8680
CIBW_BEFORE_BUILD: ""
87-
# Build for specified Python versions (universal2 for both Intel and Apple Silicon)
81+
# Build for all Python versions (universal2 for both Intel and Apple Silicon)
8882
CIBW_BUILD: cp38-macosx_* cp39-macosx_* cp310-macosx_* cp311-macosx_* cp312-macosx_* cp313-macosx_* cp314-macosx_*
8983
# Use delocate to bundle dependencies
9084
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel} --ignore-missing-dependencies"

.github/workflows/_build_windows.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ name: Build Windows Wheels
22

33
on:
44
workflow_call:
5-
inputs:
6-
python-versions:
7-
description: 'Python versions to build for'
8-
required: false
9-
type: string
10-
default: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]'
115

126
jobs:
137
build-windows:
@@ -94,7 +88,7 @@ jobs:
9488
env:
9589
# Skip before-build since we already built vendors
9690
CIBW_BEFORE_BUILD: ""
97-
# Build for specified Python versions
91+
# Build for all Python versions
9892
CIBW_BUILD: cp38-win_amd64 cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64 cp313-win_amd64 cp314-win_amd64
9993

10094
# Setup Python versions for testing

.github/workflows/ci.yml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,30 @@ jobs:
3030
TEST_PROXY_URL: ${{ secrets.TEST_PROXY_URL }}
3131
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3232

33+
# ============================================================
34+
# Build Test Jobs
35+
# ============================================================
36+
build-test-linux:
37+
name: Build Test (Linux)
38+
needs: load-config
39+
uses: ./.github/workflows/_build_linux.yml
40+
41+
build-test-macos:
42+
name: Build Test (macOS)
43+
needs: load-config
44+
uses: ./.github/workflows/_build_macos.yml
45+
46+
build-test-windows:
47+
name: Build Test (Windows)
48+
needs: load-config
49+
uses: ./.github/workflows/_build_windows.yml
50+
3351
# ============================================================
3452
# Summary
3553
# ============================================================
3654
summary:
3755
name: CI Summary
38-
needs: [load-config, test]
56+
needs: [load-config, test, build-test-linux, build-test-macos, build-test-windows]
3957
if: always()
4058
runs-on: ubuntu-latest
4159

@@ -59,6 +77,40 @@ jobs:
5977
echo "⊘ Tests: DISABLED"
6078
fi
6179
80+
# Build Tests
81+
echo ""
82+
echo "Build Tests:"
83+
84+
# Linux
85+
if [ "${{ needs.build-test-linux.result }}" == "success" ]; then
86+
echo " ✅ Linux: PASSED"
87+
elif [ "${{ needs.build-test-linux.result }}" == "skipped" ]; then
88+
echo " ⊘ Linux: SKIPPED"
89+
else
90+
echo " ❌ Linux: FAILED"
91+
EXIT_CODE=1
92+
fi
93+
94+
# macOS
95+
if [ "${{ needs.build-test-macos.result }}" == "success" ]; then
96+
echo " ✅ macOS: PASSED"
97+
elif [ "${{ needs.build-test-macos.result }}" == "skipped" ]; then
98+
echo " ⊘ macOS: SKIPPED"
99+
else
100+
echo " ❌ macOS: FAILED"
101+
EXIT_CODE=1
102+
fi
103+
104+
# Windows
105+
if [ "${{ needs.build-test-windows.result }}" == "success" ]; then
106+
echo " ✅ Windows: PASSED"
107+
elif [ "${{ needs.build-test-windows.result }}" == "skipped" ]; then
108+
echo " ⊘ Windows: SKIPPED"
109+
else
110+
echo " ❌ Windows: FAILED"
111+
EXIT_CODE=1
112+
fi
113+
62114
echo ""
63115
if [ "${EXIT_CODE:-0}" == "1" ]; then
64116
echo "❌ CI Pipeline FAILED"

docs/source/conf.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1313

1414
project = "httpmorph"
15-
copyright = "2025, httpmorph contributors"
16-
author = "httpmorph contributors"
15+
copyright = "2025, Arman Hossain"
16+
author = "Arman Hossain"
1717

1818
# Read version from package metadata (single source of truth: pyproject.toml)
1919
try:
@@ -43,6 +43,30 @@
4343
html_theme = "sphinx_rtd_theme"
4444
html_static_path = ["_static"]
4545

46+
# Theme options for Read the Docs theme
47+
html_theme_options = {
48+
"display_version": True,
49+
"prev_next_buttons_location": "bottom",
50+
"style_external_links": False,
51+
"collapse_navigation": False,
52+
"sticky_navigation": True,
53+
"navigation_depth": 4,
54+
}
55+
56+
# Add author contact information
57+
html_context = {
58+
"display_github": True,
59+
"github_user": "arman-bd",
60+
"github_repo": "httpmorph",
61+
"github_version": "main",
62+
"conf_py_path": "/docs/source/",
63+
}
64+
65+
# Additional metadata
66+
html_show_sourcelink = True
67+
html_show_sphinx = True
68+
html_show_copyright = True
69+
4670
# -- Options for autodoc -----------------------------------------------------
4771
autodoc_member_order = "bysource"
4872
autodoc_typehints = "description"

docs/source/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,11 @@ License
8989
-------
9090

9191
MIT License
92+
93+
Author
94+
------
95+
96+
**Arman Hossain**
97+
98+
- GitHub: `arman-bd <https://github.com/arman-bd>`_
99+
- Email: arman@bytetunnels.com

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires = [
3-
"setuptools>=68.0",
3+
"setuptools>=68.0,<75.4.0",
44
"wheel",
55
"Cython>=3.0",
66
"tomli>=2.0.0; python_version < '3.11'"
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
99

1010
[project]
1111
name = "httpmorph"
12-
version = "0.2.0"
12+
version = "0.2.1"
1313
description = "A Python HTTP client focused on mimicking browser fingerprints."
1414
readme = "README.md"
1515
requires-python = ">=3.8"

0 commit comments

Comments
 (0)