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

Commitfb083bb

Browse files
committed
Adjust setup.py for wheel building
1 parent6510ff7 commitfb083bb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎setup.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def run(self):
9494
# Add build_dotnet to the build tasks:
9595
fromdistutils.command.buildimportbuildas_build
9696
fromsetuptools.command.developimportdevelopas_develop
97+
fromwheel.bdist_wheelimportbdist_wheelas_bdist_wheel
9798
fromsetuptoolsimportDistribution
9899
importsetuptools
99100

@@ -111,13 +112,22 @@ def install_for_development(self):
111112
returnsuper().install_for_development()
112113

113114

115+
classbdist_wheel(_bdist_wheel):
116+
deffinalize_options(self):
117+
# Monkey patch bdist_wheel to think the package is pure even though we
118+
# include DLLs
119+
super().finalize_options()
120+
self.root_is_pure=True
121+
122+
114123
# Monkey-patch Distribution s.t. it supports the dotnet_libs attribute
115124
Distribution.dotnet_libs=None
116125

117126
cmdclass= {
118127
"build":build,
119128
"build_dotnet":build_dotnet,
120129
"develop":develop,
130+
"bdist_wheel":bdist_wheel,
121131
}
122132

123133

@@ -142,9 +152,8 @@ def install_for_development(self):
142152
author="The Contributors of the Python.NET Project",
143153
author_email="pythonnet@python.org",
144154
packages=["pythonnet","pythonnet.find_libpython"],
145-
install_requires=["pycparser","clr_loader"],
155+
install_requires=["clr_loader"],
146156
long_description=long_description,
147-
# data_files=[("{install_platlib}", ["{build_lib}/pythonnet"])],
148157
py_modules=["clr"],
149158
dotnet_libs=dotnet_libs,
150159
classifiers=[
@@ -156,6 +165,7 @@ def install_for_development(self):
156165
"Programming Language :: Python :: 3.6",
157166
"Programming Language :: Python :: 3.7",
158167
"Programming Language :: Python :: 3.8",
168+
"Programming Language :: Python :: 3.9",
159169
"Operating System :: Microsoft :: Windows",
160170
"Operating System :: POSIX :: Linux",
161171
"Operating System :: MacOS :: MacOS X",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp