Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
7eef3e0d
Unverified
Commit
7eef3e0d
authored
May 31, 2023
by
Xin Yao
Committed by
GitHub
May 31, 2023
Browse files
[Bugfix] Fix setup.py (#5746)
parent
dc8a0279
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
python/setup.py
python/setup.py
+6
-6
No files found.
python/setup.py
View file @
7eef3e0d
...
@@ -138,7 +138,9 @@ def config_cython():
...
@@ -138,7 +138,9 @@ def config_cython():
language
=
"c++"
,
language
=
"c++"
,
)
)
)
)
return
cythonize
(
ret
,
force
=
True
)
return
cythonize
(
ret
,
force
=
True
,
compiler_directives
=
{
"language_level"
:
"3"
}
)
except
ImportError
:
except
ImportError
:
print
(
print
(
"WARNING: Cython is not installed, will compile without cython module"
"WARNING: Cython is not installed, will compile without cython module"
...
@@ -151,9 +153,7 @@ def copy_lib(lib_name, backend=""):
...
@@ -151,9 +153,7 @@ def copy_lib(lib_name, backend=""):
os
.
path
.
join
(
dir_
,
lib_name
,
backend
,
get_lib_pattern
(
lib_name
))
os
.
path
.
join
(
dir_
,
lib_name
,
backend
,
get_lib_pattern
(
lib_name
))
):
):
lib_file_name
=
os
.
path
.
basename
(
lib_path
)
lib_file_name
=
os
.
path
.
basename
(
lib_path
)
dst_dir_
=
os
.
path
.
dirname
(
dst_dir_
=
os
.
path
.
join
(
CURRENT_DIR
,
"dgl"
,
lib_name
,
backend
)
os
.
path
.
join
(
CURRENT_DIR
,
"dgl"
,
lib_name
,
backend
)
)
os
.
makedirs
(
os
.
makedirs
(
dst_dir_
,
dst_dir_
,
exist_ok
=
True
,
exist_ok
=
True
,
...
@@ -162,7 +162,7 @@ def copy_lib(lib_name, backend=""):
...
@@ -162,7 +162,7 @@ def copy_lib(lib_name, backend=""):
os
.
path
.
join
(
dir_
,
lib_name
,
backend
,
lib_file_name
),
os
.
path
.
join
(
dir_
,
lib_name
,
backend
,
lib_file_name
),
dst_dir_
,
dst_dir_
,
)
)
fo
.
write
(
"include dgl/
tensoradapter/%s/%s
\n
"
%
(
backend
,
lib_file_name
)
)
fo
.
write
(
f
"include dgl/
{
lib_name
}
/
{
backend
}
/
{
lib_file_name
}
\n
"
)
include_libs
=
False
include_libs
=
False
...
@@ -194,7 +194,7 @@ if wheel_include_libs:
...
@@ -194,7 +194,7 @@ if wheel_include_libs:
def
get_lib_file_path
(
lib_name
,
backend
=
""
):
def
get_lib_file_path
(
lib_name
,
backend
=
""
):
return
(
return
(
f
"dgl/
{
lib_name
}
"
if
backend
==
""
else
f
"dgl/
{
lib_name
}
/
{
backend
}
"
,
f
"dgl/
{
lib_name
}
/
{
backend
}
"
,
glob
.
glob
(
glob
.
glob
(
os
.
path
.
join
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
relpath
(
path
,
CURRENT_DIR
)),
os
.
path
.
dirname
(
os
.
path
.
relpath
(
path
,
CURRENT_DIR
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment