Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b1c47b

Browse files
authored
do not install cython as build dependency (#610)
User can not cythonize during `pip install msgpack`.So remove cython from build dependency.If user need to use another Cython, user should download sdist, unzip,manually cythonize, and `pip install .`.
1 parent9cea8b6 commit0b1c47b

File tree

2 files changed

+1
-50
lines changed

2 files changed

+1
-50
lines changed

‎pyproject.toml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
[build-system]
2-
requires = [
3-
# Also declared in requirements.txt, if updating here please also update there
4-
"Cython~=3.0.10",
5-
"setuptools >= 69.5.1",
6-
]
2+
requires = ["setuptools >= 69.5.1"]
73
build-backend ="setuptools.build_meta"
84

95
[project]

‎setup.py‎

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,9 @@
33
importsys
44

55
fromsetuptoolsimportExtension,setup
6-
fromsetuptools.command.build_extimportbuild_ext
7-
fromsetuptools.command.sdistimportsdist
86

97
PYPY=hasattr(sys,"pypy_version_info")
108

11-
12-
classNoCython(Exception):
13-
pass
14-
15-
16-
try:
17-
importCython.Compiler.Mainascython_compiler
18-
19-
have_cython=True
20-
exceptImportError:
21-
have_cython=False
22-
23-
24-
defcythonize(src):
25-
ifnothave_cython:
26-
raiseException("Cython is required for building from checkout")
27-
sys.stderr.write(f"cythonize:{src!r}\n")
28-
cython_compiler.compile([src])
29-
30-
31-
defensure_source(src):
32-
pyx=os.path.splitext(src)[0]+".pyx"
33-
34-
ifnotos.path.exists(src)orhave_cythonandos.stat(src).st_mtime<os.stat(pyx).st_mtime:
35-
cythonize(pyx)
36-
37-
38-
classBuildExt(build_ext):
39-
defbuild_extension(self,ext):
40-
forsrcinext.sources:
41-
ensure_source(src)
42-
returnbuild_ext.build_extension(self,ext)
43-
44-
45-
# Cython is required for sdist
46-
classSdist(sdist):
47-
def__init__(self,*args,**kwargs):
48-
cythonize("msgpack/_cmsgpack.pyx")
49-
sdist.__init__(self,*args,**kwargs)
50-
51-
529
libraries= []
5310
macros= []
5411
ext_modules= []
@@ -69,9 +26,7 @@ def __init__(self, *args, **kwargs):
6926
)
7027
dellibraries,macros
7128

72-
7329
setup(
74-
cmdclass={"build_ext":BuildExt,"sdist":Sdist},
7530
ext_modules=ext_modules,
7631
packages=["msgpack"],
7732
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp