rencode 1.0.6__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rencode-1.0.7/PKG-INFO +17 -0
- rencode-1.0.7/build.py +58 -0
- rencode-1.0.7/pyproject.toml +32 -0
- rencode-1.0.7/rencode/_rencode.c +18015 -0
- rencode-1.0.7/rencode/_rencode.html +3402 -0
- rencode-1.0.7/rencode/_rencode.pyx +533 -0
- rencode-1.0.7/rencode/_rencode.pyx.perfimprovments +613 -0
- {rencode-1.0.6 → rencode-1.0.7}/rencode/rencode_orig.py +113 -60
- rencode-1.0.6/MANIFEST.in +0 -4
- rencode-1.0.6/PKG-INFO +0 -203
- rencode-1.0.6/README.md +0 -192
- rencode-1.0.6/rencode/rencode.c +0 -11648
- rencode-1.0.6/rencode.egg-info/PKG-INFO +0 -203
- rencode-1.0.6/rencode.egg-info/SOURCES.txt +0 -13
- rencode-1.0.6/rencode.egg-info/dependency_links.txt +0 -1
- rencode-1.0.6/rencode.egg-info/top_level.txt +0 -1
- rencode-1.0.6/setup.cfg +0 -4
- rencode-1.0.6/setup.py +0 -96
- rencode-1.0.6/tests/test_rencode.py +0 -227
- rencode-1.0.6/tests/timetest.py +0 -365
- {rencode-1.0.6 → rencode-1.0.7}/COPYING +0 -0
- {rencode-1.0.6 → rencode-1.0.7}/rencode/__init__.py +0 -0
rencode-1.0.7/PKG-INFO
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: rencode
|
|
3
|
+
Version: 1.0.7
|
|
4
|
+
Summary: rencode is an object serialization library similar to bencode from the Bittorrent project.
|
|
5
|
+
License: GPLv3
|
|
6
|
+
Author: Andrew Resch
|
|
7
|
+
Author-email: andrewresch@gmail.com
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: License :: Other/Proprietary License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Requires-Dist: cython (>=3)
|
|
17
|
+
Requires-Dist: setuptools (>=80.4.0,<81.0.0)
|
rencode-1.0.7/build.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import shutil
|
|
5
|
+
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from Cython.Build import cythonize
|
|
9
|
+
from setuptools import Distribution
|
|
10
|
+
from setuptools import Extension
|
|
11
|
+
from setuptools.command.build_ext import build_ext
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
COMPILE_ARGS = ["-march=native", "-O3", "-msse", "-msse2", "-mfma", "-mfpmath=sse"]
|
|
15
|
+
LINK_ARGS: list[str] = []
|
|
16
|
+
INCLUDE_DIRS: list[str] = []
|
|
17
|
+
LIBRARIES: list[str] = []
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def build() -> None:
|
|
21
|
+
extensions = [
|
|
22
|
+
Extension(
|
|
23
|
+
"*",
|
|
24
|
+
["rencode/*.pyx"],
|
|
25
|
+
extra_compile_args=COMPILE_ARGS,
|
|
26
|
+
extra_link_args=LINK_ARGS,
|
|
27
|
+
include_dirs=INCLUDE_DIRS,
|
|
28
|
+
libraries=LIBRARIES,
|
|
29
|
+
)
|
|
30
|
+
]
|
|
31
|
+
ext_modules = cythonize(
|
|
32
|
+
extensions,
|
|
33
|
+
include_path=INCLUDE_DIRS,
|
|
34
|
+
compiler_directives={"binding": True, "language_level": 3},
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
distribution = Distribution({
|
|
38
|
+
"name": "rencode",
|
|
39
|
+
"ext_modules": ext_modules
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
cmd = build_ext(distribution)
|
|
43
|
+
cmd.ensure_finalized()
|
|
44
|
+
cmd.run()
|
|
45
|
+
|
|
46
|
+
# Copy built extensions back to the project
|
|
47
|
+
for output in cmd.get_outputs():
|
|
48
|
+
output = Path(output)
|
|
49
|
+
relative_extension = output.relative_to(cmd.build_lib)
|
|
50
|
+
|
|
51
|
+
shutil.copyfile(output, relative_extension)
|
|
52
|
+
mode = os.stat(relative_extension).st_mode
|
|
53
|
+
mode |= (mode & 0o444) >> 2
|
|
54
|
+
os.chmod(relative_extension, mode)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
if __name__ == "__main__":
|
|
58
|
+
build()
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "rencode"
|
|
3
|
+
version = "1.0.7"
|
|
4
|
+
description = "rencode is an object serialization library similar to bencode from the Bittorrent project."
|
|
5
|
+
authors = ["Andrew Resch <andrewresch@gmail.com>"]
|
|
6
|
+
license = "GPLv3"
|
|
7
|
+
include = [{path = "rencode/*.so", format = "wheel"}, {path = "rencode/*.c", format = "sdist"}]
|
|
8
|
+
packages = [{include = "rencode"}]
|
|
9
|
+
exclude = ['rencode/*.c']
|
|
10
|
+
|
|
11
|
+
[tool.poetry.build]
|
|
12
|
+
script = "build.py"
|
|
13
|
+
|
|
14
|
+
[tool.poetry.dependencies]
|
|
15
|
+
python = "^3.9"
|
|
16
|
+
cython = ">=3"
|
|
17
|
+
setuptools = "^80.4.0"
|
|
18
|
+
|
|
19
|
+
[tool.poetry.group.dev.dependencies]
|
|
20
|
+
black = "^21.9b0"
|
|
21
|
+
cython = "^3.1.0"
|
|
22
|
+
pytest = "^8.3.5"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[tool.poetry.group.build.dependencies]
|
|
26
|
+
setuptools = "^80.9.0"
|
|
27
|
+
cython = "^3.1.1"
|
|
28
|
+
poetry-core = "^2.1.3"
|
|
29
|
+
|
|
30
|
+
[build-system]
|
|
31
|
+
requires = ["poetry-core", "setuptools", "cython"]
|
|
32
|
+
build-backend = "poetry.core.masonry.api"
|