Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add pyproject.toml and specify build dependencies #221

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools", "cython>=0.28.4,<4"]
17 changes: 4 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
pass

dev_requires = [
"cython>=0.28.4",
"flake8>=2.5",
"pytest>=2.8",
"sphinx-rtd-theme>=0.1.9",
Expand All @@ -40,13 +39,6 @@
] + tornado_requires


# cython detection
try:
from Cython.Build import cythonize
CYTHON = True
except ImportError:
CYTHON = False

cmdclass = {}
ext_modules = []

Expand All @@ -56,11 +48,10 @@

# only build ext in CPython with UNIX platform
if UNIX and not PYPY:
# rebuild .c files if cython available
if CYTHON:
cythonize("thriftpy2/transport/cybase.pyx")
cythonize("thriftpy2/transport/**/*.pyx")
cythonize("thriftpy2/protocol/cybin/cybin.pyx")
from Cython.Build import cythonize
cythonize("thriftpy2/transport/cybase.pyx")
cythonize("thriftpy2/transport/**/*.pyx")
cythonize("thriftpy2/protocol/cybin/cybin.pyx")

ext_modules.append(Extension("thriftpy2.transport.cybase",
["thriftpy2/transport/cybase.c"]))
Expand Down