-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject_dev.toml
More file actions
111 lines (95 loc) · 3.3 KB
/
Copy pathpyproject_dev.toml
File metadata and controls
111 lines (95 loc) · 3.3 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
#
# NOTE:
# -----
# Version is defined from logic implemented inside setuptools.
# You need to define environment variables PYREX_VERSION and
# ROCKSDB_VERSION before building.
[build-system]
# Add cmake to your build requirements
requires = ["setuptools>=61.0", "wheel", "pybind11[global]>=2.10", "cmake>=3.18","tomli"]
build-backend = "setuptools.build_meta"
[project]
name = "pyrex-rocksdb"
# version is defined in the setup.py script
dynamic = ["version"]
authors = [
{ name="Charilaos Mylonas", email="mylonas.charilaos@gmail.com" },
]
description = "A fast RocksDB wrapper for Python using pybind11."
readme = "README.md"
requires-python = ">=3.8"
keywords = ["rocksdb", "database", "key-value", "pybind11"]
classifiers = [
"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",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Database",
]
[project.urls]
Homepage = "https://github.com/mylonasc/pyrex"
Repository = "https://github.com/mylonasc/pyrex"
[project.optional-dependencies]
dev = [
"pytest",
"sphinx",
"sphinx-rtd-theme",
"cibuildwheel",
"pybind11-stubgen~=2.5.4",
"mypy~=1.10",
"twine"
]
# Crucial for src layout
[tool.setuptools]
packages = ["pyrex"] # Explicitly list your package
package-dir = {"" = "src"} # Tell setuptools to look in 'src' for packages
[tool.setuptools.package-data]
pyrex = ["*.pyi", "py.typed"]
[tool.cibuildwheel]
# Global build filter and skip patterns.
build = "cp39-* cp310-* cp311-* cp312-*"
# build = "cp312-*"
environment-pass = [
"ROCKSDB_VERSION",
"PYREX_VERSION",
"VCPKG_ROOT"
]
container-engine= "docker; create-args: --network=host"
# Linux specific configurations
[tool.cibuildwheel.linux]
build=["cp312-manylinux_*"]
environment = { CFLAGS = "-O3 -march=native -flto", CXXFLAGS = "-O3 -march=native -flto" ,CC = "clang", CXX = "clang++"}
before-all = """
# RHEL / CentOS / Fedora
(yum install -y gflags-devel clang cmake \
snappy-devel lz4-devel zlib-devel \
bzip2-devel libzstd-devel \
liburing-devel) || \
# Debian / Ubuntu
(apt-get update && \
apt-get install -y clang cmake build-essential \
libsnappy-dev liblz4-dev zlib1g-dev \
libbz2-dev libzstd-dev liburing-dev) || \
# Alpine
(apk add --no-cache clang gflags-dev cmake \
snappy-dev lz4-dev zlib-dev \
bzip2-dev zstd-dev liburing-dev)
"""
# macOS specific configurations
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "14.0", LDFLAGS = "-L/opt/homebrew/lib -L/usr/local/lib $LDFLAGS", CPPFLAGS = "-I/opt/homebrew/include -I/usr/local/include $CPPFLAGS" }
before-build = """
brew install cmake snappy lz4 zstd zlib bzip2
"""
# Windows specific configurations
[tool.cibuildwheel.windows]
archs = ["AMD64"]
environment = { CMAKE_TOOLCHAIN_FILE = "{{project}}/vcpkg/scripts/buildsystems/vcpkg.cmake" }