FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bitsandbytes/setup.py at fix-replace-linear-post-processing · ErenAta16/bitsandbytes · GitHub
ErenAta16
/
bitsandbytes
Public
forked from
bitsandbytes-foundation/bitsandbytes
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
bitsandbytes
/
setup.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (39 loc) · 1.52 KB
Breadcrumbs
bitsandbytes
/
setup.py
Copy path
File metadata and controls
49 lines (39 loc) · 1.52 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from
distutils
.
errors
import
DistutilsModuleError
import
os
from
warnings
import
warn
from
setuptools
import
find_packages
,
setup
from
setuptools
.
command
.
build_py
import
build_py
from
setuptools
.
dist
import
Distribution
# Tested with wheel v0.29.0
class
BinaryDistribution
(
Distribution
):
def
has_ext_modules
(
self
):
return
True
class
ExtBuildPy
(
build_py
):
def
run
(
self
):
if
os
.
environ
.
get
(
"BNB_SKIP_CMAKE"
,
""
).
lower
()
in
(
"1"
,
"true"
,
"yes"
):
print
(
"skipping CMake build"
)
else
:
# build_cmake needs to be called prior to build_py, as the latter
# collects the files output into the package directory.
try
:
self
.
run_command
(
"build_cmake"
)
except
DistutilsModuleError
:
warn
(
"scikit-build-core not installed, CMake will not be invoked automatically. "
"Please install scikit-build-core or run CMake manually to build extensions."
)
super
().
run
()
cmdclass
=
{
"build_py"
:
ExtBuildPy
}
setup_kwargs
=
{
"version"
:
"0.50.1.dev0"
,
"packages"
:
find_packages
(),
"distclass"
:
BinaryDistribution
,
"cmdclass"
: {
"build_py"
:
ExtBuildPy
},
}
if
os
.
environ
.
get
(
"BNB_SKIP_CMAKE"
,
""
).
lower
()
not
in
(
"1"
,
"true"
,
"yes"
):
setup_kwargs
[
"cmake_source_dir"
]
=
"."
setup
(
**
setup_kwargs
)
Back
|
FazBrowse Home
|
New Git URL