-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (57 loc) · 1.94 KB
/
setup.py
File metadata and controls
63 lines (57 loc) · 1.94 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
import os
from pathlib import Path
from setuptools import Extension, setup
if os.getenv("XXHASH_LINK_SO"):
libraries = ["xxhash"]
source = ["src/_xxhash.c"]
include_dirs = []
else:
libraries = []
source = ["src/_xxhash.c", "deps/xxhash/xxhash.c"]
include_dirs = ["deps/xxhash"]
ext_modules = [
Extension(
"_xxhash",
source,
include_dirs=include_dirs,
libraries=libraries,
)
]
d = Path(__file__).parent
long_description = d.joinpath("README.rst").read_text() + "\n" + d.joinpath("CHANGELOG.rst").read_text()
version_dict = {}
exec(d.joinpath("xxhash", "version.py").read_text(), {}, version_dict)
version = version_dict["VERSION"]
setup(
name="xxhash",
version=version,
description="Python binding for xxHash",
long_description=long_description,
long_description_content_type="text/x-rst",
author="Yue Du",
author_email="ifduyue@gmail.com",
url="https://github.com/ifduyue/python-xxhash",
license="BSD",
packages=["xxhash"],
ext_package="xxhash",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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 :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Free Threading :: 1 - Unstable",
],
python_requires=">=3.8",
ext_modules=ext_modules,
package_data={"xxhash": ["py.typed", "**.pyi"]},
)