Skip to content

Commit

Permalink
Merge pull request #221 from aisk/build-dependencies
Browse files Browse the repository at this point in the history
chore: add pyproject.toml and specify build dependencies
  • Loading branch information
ethe authored Aug 7, 2023
2 parents da030d3 + 1b80073 commit c8e5dd4
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 c8e5dd4

Please sign in to comment.