Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_opencv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_backend_opencv
Commits
d91f9462
Commit
d91f9462
authored
1 year ago
by
Thibault Allenet
Browse files
Options
Downloads
Patches
Plain Diff
Fix setup.py
parent
44fedd7d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+10
-8
10 additions, 8 deletions
setup.py
with
10 additions
and
8 deletions
setup.py
+
10
−
8
View file @
d91f9462
...
@@ -62,15 +62,17 @@ class CMakeBuild(build_ext):
...
@@ -62,15 +62,17 @@ class CMakeBuild(build_ext):
os
.
chdir
(
str
(
build_temp
))
os
.
chdir
(
str
(
build_temp
))
# Impose to use the executable of the python
# Impose to use the executable of the python
# used to launch setup.py to setup PythonInterp
# used to launch setup.py to setup PythonInterp
param_py
=
"
-DPYTHON_EXECUTABLE=
"
+
sys
.
executable
param_py
=
"
-DPYTHON_EXECUTABLE=
"
+
sys
.
executable
install_path
=
f
"
{
build_temp
}
/install
"
if
"
AIDGE_INSTALL
"
not
in
os
.
environ
else
os
.
environ
[
"
AIDGE_INSTALL
"
]
self
.
spawn
([
'
cmake
'
,
str
(
cwd
),
param_py
,
'
-DTEST=OFF
'
,
f
'
-DCMAKE_INSTALL_PREFIX:PATH=
{
install_path
}
'
])
compile_type
=
'
Debug
'
install_path
=
os
.
path
.
join
(
sys
.
prefix
,
"
lib
"
,
"
libAidge
"
)
if
"
AIDGE_INSTALL
"
not
in
os
.
environ
else
os
.
environ
[
"
AIDGE_INSTALL
"
]
self
.
spawn
([
'
cmake
'
,
str
(
cwd
),
param_py
,
'
-DTEST=OFF
'
,
f
'
-DCMAKE_INSTALL_PREFIX:PATH=
{
install_path
}
'
,
f
'
-DCMAKE_BUILD_TYPE=
{
compile_type
}
'
])
if
not
self
.
dry_run
:
if
not
self
.
dry_run
:
self
.
spawn
([
'
make
'
,
'
all
'
,
'
install
'
,
'
-j
'
,
max_jobs
])
self
.
spawn
([
'
cmake
'
,
'
--build
'
,
'
.
'
,
'
--config
'
,
compile_type
,
'
-j
'
,
max_jobs
])
self
.
spawn
([
'
cmake
'
,
'
--install
'
,
'
.
'
,
'
--config
'
,
compile_type
])
os
.
chdir
(
str
(
cwd
))
os
.
chdir
(
str
(
cwd
))
aidge_package
=
build_lib
/
(
get_project_name
())
aidge_package
=
build_lib
/
(
get_project_name
())
...
@@ -81,9 +83,9 @@ class CMakeBuild(build_ext):
...
@@ -81,9 +83,9 @@ class CMakeBuild(build_ext):
# Copy all shared object files from build_temp/lib to aidge_package
# Copy all shared object files from build_temp/lib to aidge_package
for
root
,
_
,
files
in
os
.
walk
(
build_temp
.
absolute
()):
for
root
,
_
,
files
in
os
.
walk
(
build_temp
.
absolute
()):
for
file
in
files
:
for
file
in
files
:
if
file
.
endswith
(
'
.so
'
)
and
(
root
!=
str
(
aidge_package
.
absolute
())):
if
(
file
.
endswith
(
'
.so
'
)
or
file
.
endswith
(
'
.pyd
'
))
and
(
root
!=
str
(
aidge_package
.
absolute
())):
currentFile
=
os
.
path
.
join
(
root
,
file
)
currentFile
=
os
.
path
.
join
(
root
,
file
)
shutil
.
copy
(
currentFile
,
str
(
aidge_package
.
absolute
()))
shutil
.
copy
(
currentFile
,
str
(
aidge_package
.
absolute
()))
# Copy version.txt in aidge_package
# Copy version.txt in aidge_package
os
.
chdir
(
os
.
path
.
dirname
(
__file__
))
os
.
chdir
(
os
.
path
.
dirname
(
__file__
))
...
@@ -100,13 +102,13 @@ if __name__ == '__main__':
...
@@ -100,13 +102,13 @@ if __name__ == '__main__':
long_description_content_type
=
"
text/markdown
"
,
long_description_content_type
=
"
text/markdown
"
,
long_description
=
"
\n
"
.
join
(
DOCLINES
[
2
:]),
long_description
=
"
\n
"
.
join
(
DOCLINES
[
2
:]),
classifiers
=
[
c
for
c
in
CLASSIFIERS
.
split
(
'
\n
'
)
if
c
],
classifiers
=
[
c
for
c
in
CLASSIFIERS
.
split
(
'
\n
'
)
if
c
],
platforms
=
[
"
Linux
"
],
packages
=
find_packages
(
where
=
"
.
"
),
packages
=
find_packages
(
where
=
"
.
"
),
include_package_data
=
True
,
include_package_data
=
True
,
ext_modules
=
[
CMakeExtension
(
get_project_name
())],
ext_modules
=
[
CMakeExtension
(
get_project_name
())],
cmdclass
=
{
cmdclass
=
{
'
build_ext
'
:
CMakeBuild
,
'
build_ext
'
:
CMakeBuild
,
},
},
install_requires
=
[
'
aidge_core
'
,
'
aidge_backend_cpu
'
],
zip_safe
=
False
,
zip_safe
=
False
,
)
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment