Skip to content

Commit

Permalink
add cython to setup_requires if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Nov 25, 2020
1 parent 922197e commit cc0538c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
if: "! startsWith(matrix.python, 'pypy')"
run: |
pip install cython
python setup.py cython
- name: remove tornado
if: matrix.tornado == 'none'
Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1366,13 +1366,17 @@ def find_packages():
zip_safe=False,
python_requires=">=3.6",
install_requires=[
"py; implementation_name === 'pypy'",
"cffi; implementation_name === 'pypy'",
"py; implementation_name == 'pypy'",
"cffi; implementation_name == 'pypy'",
],
setup_requires=[
"cffi; implementation_name === 'pypy'",
"cffi; implementation_name == 'pypy'",
],
)
if not os.path.exists(os.path.join("zmq", "backend", "cython", "socket.c")):
setup_args["setup_requires"].append(
f"cython>={min_cython_version}; implementation_name == 'cpython'"
)


setup(**setup_args)

0 comments on commit cc0538c

Please sign in to comment.