Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_cpu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Charles Villard
aidge_backend_cpu
Commits
f4b382c3
Commit
f4b382c3
authored
1 year ago
by
Cyril Moineau
Browse files
Options
Downloads
Patches
Plain Diff
[setup.py] Update setup.py to install Cmake lib in python env by default.
parent
6cb11706
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+6
-4
6 additions, 4 deletions
README.md
setup.py
+5
-5
5 additions, 5 deletions
setup.py
with
11 additions
and
9 deletions
README.md
+
6
−
4
View file @
f4b382c3
...
@@ -14,9 +14,11 @@ So far be sure to have the correct requirements to use this library
...
@@ -14,9 +14,11 @@ So far be sure to have the correct requirements to use this library
## Pip installation
## Pip installation
You will need to install first the aidge_core library before installing aidge_cpu.
You will need to install first the
``aidge_core``
library before installing
``aidge_backend_cpu``
.
Also, make sure that the install path was set before installing aidge_core library.
Then run in your python environnement :
If you have set a custom install path for the
``aidge_core``
library, make sure to use the same one here.
Then run in your python environnement :
```
bash
```
bash
pip
install
.
-v
pip
install
.
-v
```
```
...
@@ -46,4 +48,4 @@ Important: this command can also be run with `make`.
...
@@ -46,4 +48,4 @@ Important: this command can also be run with `make`.
To compile the CPU library with the python binding + the associated unitary tests, run
To compile the CPU library with the python binding + the associated unitary tests, run
```
```
make cpu_with_pybind_tests
make cpu_with_pybind_tests
```
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
+
5
−
5
View file @
f4b382c3
...
@@ -62,11 +62,11 @@ class CMakeBuild(build_ext):
...
@@ -62,11 +62,11 @@ 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
"
]
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
}
'
])
self
.
spawn
([
'
cmake
'
,
str
(
cwd
),
param_py
,
'
-DTEST=OFF
'
,
f
'
-DCMAKE_INSTALL_PREFIX:PATH=
{
install_path
}
'
])
if
not
self
.
dry_run
:
if
not
self
.
dry_run
:
...
@@ -83,11 +83,11 @@ class CMakeBuild(build_ext):
...
@@ -83,11 +83,11 @@ class CMakeBuild(build_ext):
for
file
in
files
:
for
file
in
files
:
if
file
.
endswith
(
'
.so
'
)
and
(
root
!=
str
(
aidge_package
.
absolute
())):
if
file
.
endswith
(
'
.so
'
)
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__
))
shutil
.
copy
(
"
version.txt
"
,
str
(
aidge_package
.
absolute
()))
shutil
.
copy
(
"
version.txt
"
,
str
(
aidge_package
.
absolute
()))
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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