8000 Merge pull request #88 from adamnovak/require-cython-when-used · DavidKorczynski/http-parser@83ef694 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83ef694

Browse files
authored
Merge pull request benoitc#88 from adamnovak/require-cython-when-used
Require a recent Cython when building C code
2 parents 752466b + 190a178 commit 83ef694

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file is renamed to "setup.toml.dev" in release tarballs so that
2+
# Pip won't try to use it.
3+
4+
[build-system]
5+
# In addition to setuptools and wheel, we need modern Cython, because we are
6+
# not a packaged release.
7+
requires = ["setuptools", "wheel", "cython>=0.28.3"]
8+

pyproject.toml.release

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file is renamed to "setup.toml" in release tarballs so that
2+
# Pip will use it.
3+
4+
[build-system]
5+
# Release packages only need the standard setuptools and wheel.
6+
requires = ["setuptools", "wheel"]
7+

requirements_dev.txt

-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pytest
2-
cython
2+
cython>=0.28.3

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,16 @@ def run(self):
8282
if os.path.exists('Makefile'):
8383
make()
8484
os.rename('Makefile', 'Makefile.ext')
85+
os.rename('pyproject.toml', 'pyproject.toml.dev')
86+
os.rename('pyproject.toml.release', 'pyproject.toml')
8587
renamed = True
8688
try:
8789
return _sdist.run(self)
8890
finally:
8991
if renamed:
9092
os.rename('Makefile.ext', 'Makefile')
93+
os.rename('pyproject.toml', 'pyproject.toml.release')
94+
os.rename('pyproject.toml.dev', 'pyproject.toml')
9195

9296
class BuildFailed(Exception):
9397
pass

0 commit comments

Comments
 (0)
0