Skip to content

Commit

Permalink
chore: add pyproject.toml and specify build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk authored and ethe committed Aug 7, 2023
1 parent da030d3 commit 1b80073
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
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

0 comments on commit 1b80073

Please sign in to comment.