forked from aiortc/aioquic
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vendor OpenSSL.crypto, and pylsqpack (v1.0.3), plus making the packag…
…e abi3 (#2) * vendor OpenSSL.crypto instead of requiring whole package and backport aiortc#373 by kdashg * vendor pylsqpack and upgrade it to v1.0.3 (major v2 available but breaking) and (todo) not abi3 ready * fix manifest include vendor (lsqpack) * make pylsqpack abi3 ready * bump version to 0.10.0 * reformat connection.py * fix tests.yml workflow * fix xxhash include dir in setup.py * fix docs job and tests on windows * fix test on windows (choco install openssl issue, headers non-existent) * fix test on windows (choco install openssl issue, headers non-existent)*2
- Loading branch information
Showing
18 changed files
with
4,194 additions
and
184 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vendor/ls-qpack"] | ||
path = vendor/ls-qpack | ||
url = https://github.com/litespeedtech/ls-qpack.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,71 @@ | ||
import sys | ||
import os | ||
from wheel.bdist_wheel import bdist_wheel | ||
|
||
import setuptools | ||
|
||
include_dirs = [ | ||
os.path.join("vendor", "ls-qpack"), | ||
os.path.join("vendor", "ls-qpack", "deps", "xxhash"), | ||
] | ||
|
||
if sys.platform == "win32": | ||
extra_compile_args = [] | ||
libraries = ["libcrypto", "advapi32", "crypt32", "gdi32", "user32", "ws2_32"] | ||
libraries = [ | ||
"libcrypto", | ||
"advapi32", | ||
"crypt32", | ||
"gdi32", | ||
"user32", | ||
"ws2_32", | ||
] | ||
include_dirs.append( | ||
os.path.join("vendor", "ls-qpack", "wincompat"), | ||
) | ||
else: | ||
extra_compile_args = ["-std=c99"] | ||
libraries = ["crypto"] | ||
|
||
|
||
class bdist_wheel_abi3(bdist_wheel): | ||
def get_tag(self): | ||
python, abi, plat = super().get_tag() | ||
|
||
if python.startswith("cp"): | ||
return "cp37", "abi3", plat | ||
|
||
return python, abi, plat | ||
|
||
|
||
setuptools.setup( | ||
ext_modules=[ | ||
setuptools.Extension( | ||
"aioquic._buffer", | ||
extra_compile_args=extra_compile_args, | ||
sources=["src/aioquic/_buffer.c"], | ||
define_macros=[("Py_LIMITED_API", "0x03070000")], | ||
py_limited_api=True, | ||
), | ||
setuptools.Extension( | ||
"aioquic._crypto", | ||
extra_compile_args=extra_compile_args, | ||
libraries=libraries, | ||
sources=["src/aioquic/_crypto.c"], | ||
define_macros=[("Py_LIMITED_API", "0x03070000")], | ||
py_limited_api=True, | ||
), | ||
setuptools.Extension( | ||
"aioquic._vendor.pylsqpack._binding", | ||
extra_compile_args=extra_compile_args, | ||
include_dirs=include_dirs, | ||
sources=[ | ||
"src/aioquic/_vendor/pylsqpack/binding.c", | ||
"vendor/ls-qpack/lsqpack.c", | ||
"vendor/ls-qpack/deps/xxhash/xxhash.c", | ||
], | ||
define_macros=[("Py_LIMITED_API", "0x03070000")], | ||
py_limited_api=True, | ||
), | ||
], | ||
cmdclass={"bdist_wheel": bdist_wheel_abi3}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.9.21" | ||
__version__ = "0.10.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.